MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / OnInput

Method OnInput

projects/uMenu/source/ul/menu/ui/ui_QuickMenu.cpp:119–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117 }
118
119 void QuickMenu::OnInput(const u64 keys_down, const u64 keys_up, const u64 keys_held, const pu::ui::TouchPoint touch_pos) {
120 if(this->on) {
121 this->options_menu->OnInput(keys_down, keys_up, keys_held, touch_pos);
122 }
123
124 if((keys_down & HidNpadButton_ZL) || (keys_down & HidNpadButton_ZR)) {
125 this->Toggle();
126 }
127 else if((keys_down & HidNpadButton_B) || (keys_down & HidNpadButton_A)) {
128 // B only valid for toggling off
129 // A = something selected in the menu
130 if(this->on) {
131 this->Toggle();
132 }
133 }
134 else {
135 if(g_HomePressed) {
136 if(this->on) {
137 this->Toggle();
138 }
139
140 g_HomePressed = false;
141 }
142 }
143 }
144
145}

Callers

nothing calls this directly

Calls 1

ToggleMethod · 0.95

Tested by

no test coverage detected