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

Function onMouseUp

src/OpenLoco/src/Ui/Windows/MusicSelection.cpp:294–309  ·  view source on GitHub ↗

0x004C1757

Source from the content-addressed store, hash-verified

292
293 // 0x004C1757
294 static void onMouseUp(Ui::Window& window, WidgetIndex_t widgetIndex, [[maybe_unused]] const WidgetId id)
295 {
296 switch (widgetIndex)
297 {
298 case widx::close:
299 WindowManager::close(window.type);
300 break;
301
302 case sort_title:
303 cycleSortMode(window, Jukebox::MusicSortMode::titleAscending, Jukebox::MusicSortMode::titleDescending);
304 break;
305 case sort_years:
306 cycleSortMode(window, Jukebox::MusicSortMode::yearsDescending, Jukebox::MusicSortMode::yearsAscending);
307 break;
308 }
309 }
310
311 // 0x004C1799
312 static void onScrollMouseDown(Ui::Window& window, [[maybe_unused]] int16_t x, int16_t y, [[maybe_unused]] uint8_t scroll_index)

Callers

nothing calls this directly

Calls 2

cycleSortModeFunction · 0.85
closeFunction · 0.70

Tested by

no test coverage detected