MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / BuildRailStationGlobalHotkeys

Method BuildRailStationGlobalHotkeys

src/rail_gui.cpp:1378–1384  ·  view source on GitHub ↗

* Handler for global hotkeys of the BuildRailStationWindow. * @param hotkey Hotkey * @return ES_HANDLED if hotkey was accepted. */

Source from the content-addressed store, hash-verified

1376 * @return ES_HANDLED if hotkey was accepted.
1377 */
1378 static EventState BuildRailStationGlobalHotkeys(int hotkey)
1379 {
1380 if (_game_mode == GM_MENU) return ES_NOT_HANDLED;
1381 Window *w = ShowStationBuilder(FindWindowById(WC_BUILD_TOOLBAR, TRANSPORT_RAIL));
1382 if (w == nullptr) return ES_NOT_HANDLED;
1383 return w->OnHotkey(hotkey);
1384 }
1385
1386 static inline HotkeyList hotkeys{"buildrailstation", {
1387 Hotkey('F', "focus_filter_box", PCWHK_FOCUS_FILTER_BOX),

Callers

nothing calls this directly

Calls 3

ShowStationBuilderFunction · 0.85
FindWindowByIdFunction · 0.85
OnHotkeyMethod · 0.45

Tested by

no test coverage detected