MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / keyUp

Function keyUp

src/OpenLoco/src/Ui/Windows/PromptOkCancelWindow.cpp:94–110  ·  view source on GitHub ↗

0x00447125

Source from the content-addressed store, hash-verified

92
93 // 0x00447125
94 static bool keyUp(Window& w, [[maybe_unused]] uint32_t charCode, uint32_t keyCode)
95 {
96 switch (keyCode)
97 {
98 case SDLK_ESCAPE:
99 w.callOnMouseUp(widx::closeButton, w.widgets[widx::closeButton].id);
100 return true;
101
102 case SDLK_RETURN:
103 case SDLK_KP_ENTER:
104 w.callOnMouseUp(widx::okButton, w.widgets[widx::okButton].id);
105 return true;
106
107 default:
108 return false;
109 }
110 }
111
112 // 0x00447093
113 static void prepareDraw([[maybe_unused]] Window& self)

Callers

nothing calls this directly

Calls 1

callOnMouseUpMethod · 0.80

Tested by

no test coverage detected