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

Method update

3ds/source/ScriptPickerOverlay.cpp:75–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75void ScriptPickerOverlay::update(const InputState& input)
76{
77 (void)input;
78 const int count = rowCount();
79 mHid.update(count > 0 ? count : 1);
80
81 u32 kDown = hidKeysDown();
82 if ((kDown & KEY_A) && count > 0) {
83 ScriptCatalog::Entry entry = mEntries[mHid.fullIndex()];
84 auto pick = mOnPick; // copy to the stack: removeOverlay() destroys *this
85 screen.removeOverlay(); // dismiss the picker before running the callback
86 pick(entry);
87 return;
88 }
89 if (kDown & KEY_B) {
90 screen.removeOverlay();
91 return;
92 }
93}

Callers

nothing calls this directly

Calls 2

fullIndexMethod · 0.80
removeOverlayMethod · 0.80

Tested by

no test coverage detected