MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / ErrorOverlay

Method ErrorOverlay

switch/source/ErrorOverlay.cpp:32–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30#include "i18n.hpp"
31
32ErrorOverlay::ErrorOverlay(Screen& screen, Result mres, const std::string& mtext) : Overlay(screen)
33{
34 res = mres;
35 text = mtext;
36 // hasHeader: reserve the band the "Error: 0x..." line draws into.
37 layout = ModalChrome::fitText(text, ModalChrome::TEXT_SIZE, true);
38 button = std::make_unique<Clickable>(
39 ModalChrome::BTN_WIDE_X, layout.btnY, ModalChrome::BTN_WIDE_W, ModalChrome::BTN_H, COLOR_BG, COLOR_WHITE, "OK", true);
40 button->selected(true);
41}
42
43void ErrorOverlay::draw(void) const
44{

Callers

nothing calls this directly

Calls 1

selectedMethod · 0.80

Tested by

no test coverage detected