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

Method BuildObjectGlobalHotkeys

src/object_gui.cpp:375–381  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

373 * @return ES_HANDLED if hotkey was accepted.
374 */
375 static EventState BuildObjectGlobalHotkeys(int hotkey)
376 {
377 if (_game_mode == GM_MENU) return ES_NOT_HANDLED;
378 Window *w = ShowBuildObjectPicker();
379 if (w == nullptr) return ES_NOT_HANDLED;
380 return w->OnHotkey(hotkey);
381 }
382
383 static inline HotkeyList hotkeys{"buildobject", {
384 Hotkey('F', "focus_filter_box", PCWHK_FOCUS_FILTER_BOX),

Callers

nothing calls this directly

Calls 2

ShowBuildObjectPickerFunction · 0.85
OnHotkeyMethod · 0.45

Tested by

no test coverage detected