MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnKeyDown

Method OnKeyDown

Descent3/newui_core.cpp:2271–2287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2269}
2270
2271void newuiMenuOptionButton::OnKeyDown(int key) {
2272 if (key == KEY_DOWN || key == KEY_RIGHT) {
2273 if (m_next_btn) {
2274 if (UIGadget::IsLocked()) {
2275 UNLOCK_FOCUS(this);
2276 }
2277 m_Wnd->SetFocusOnGadget(m_next_btn, true);
2278 }
2279 } else if (key == KEY_UP || key == KEY_LEFT) {
2280 if (m_prev_btn) {
2281 if (UIGadget::IsLocked()) {
2282 UNLOCK_FOCUS(this);
2283 }
2284 m_Wnd->SetFocusOnGadget(m_prev_btn, true);
2285 }
2286 }
2287}
2288
2289void newuiMenuOptionButton::OnKeyUp(int key) {}
2290

Callers

nothing calls this directly

Calls 2

SetCurrentIndexFunction · 0.85
SetFocusOnGadgetMethod · 0.80

Tested by

no test coverage detected