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

Method draw

switch/source/ScriptRequestOverlays.cpp:52–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50ScriptTileOverlay::ScriptTileOverlay(Screen& screen, std::string title) : Overlay(screen), mTitle(std::move(title)) {}
51
52void ScriptTileOverlay::draw(void) const
53{
54 // Focused log: draw nothing at all, not even the scrim. The point is the
55 // lines the card was covering, and ScriptScreen's hint row is what says the
56 // dialog is still there.
57 if (ScriptScreen::logFocused()) {
58 return;
59 }
60
61 // uiFrame dims the log and centres the card over it: the transcript stays
62 // legible around the dialog, which is usually the context for the answer.
63 const int bodyY = ScriptTile::uiFrame(mTitle, headerNote());
64 drawBody(bodyY);
65 // Every dialog offers the same escape to the transcript, so the Y hint is
66 // appended here rather than repeated in four hints() overrides.
67 ScriptTile::uiHints(hints() + " " + UiKit::buttonGlyph("Y") + " " + i18n::t("scripts.view_log"));
68}
69
70void ScriptTileOverlay::update(const InputState& input)
71{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected