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

Function onMouseUp

src/OpenLoco/src/Ui/Windows/TimePanel.cpp:193–213  ·  view source on GitHub ↗

0x004398FB

Source from the content-addressed store, hash-verified

191
192 // 0x004398FB
193 static void onMouseUp([[maybe_unused]] Ui::Window& window, WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id)
194 {
195 switch (widgetIndex)
196 {
197 case Widx::date_btn:
198 MessageWindow::open();
199 break;
200 case Widx::pause_btn:
201 GameCommands::doCommand(GameCommands::PauseGameArgs{}, GameCommands::Flags::apply);
202 break;
203 case Widx::normal_speed_btn:
204 GameCommands::doCommand(GameCommands::SetGameSpeedArgs{ GameSpeed::Normal }, GameCommands::Flags::apply);
205 break;
206 case Widx::fast_forward_btn:
207 GameCommands::doCommand(GameCommands::SetGameSpeedArgs{ GameSpeed::FastForward }, GameCommands::Flags::apply);
208 break;
209 case Widx::extra_fast_forward_btn:
210 GameCommands::doCommand(GameCommands::SetGameSpeedArgs{ GameSpeed::ExtraFastForward }, GameCommands::Flags::apply);
211 break;
212 }
213 }
214
215 // 0x0043A67F
216 static void mapMouseDown(Ui::Window* self, WidgetIndex_t widgetIndex)

Callers

nothing calls this directly

Calls 2

openFunction · 0.70
doCommandFunction · 0.50

Tested by

no test coverage detected