From ff9c9ad864b7b3e8a03f76e8888c0b733819b24a Mon Sep 17 00:00:00 2001 From: Rampoina Date: Fri, 15 Jul 2022 03:54:55 +0200 Subject: [PATCH] add hotkeybuild1 --- source/glest_game/gui/gui.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index ce6f79f6..f810d2b0 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -447,6 +447,19 @@ void Gui::hotKey(SDL_KeyboardEvent key) { else if(isKeyPressed(configKeys.getSDLKey("HotKeySelectedUnitsStop"),key) == true) { clickCommonCommand(ccStop); } + + else if(isKeyPressed(configKeys.getSDLKey("HotKeyBuild1"),key) == true) { + const CommandType *ct; + for(int i=0; igetType()->getFirstCtOfClass(ccBuild); + if(ct != NULL) { + break; + } + } + clickCommonCommand(ct->getClass()); + } + } void Gui::switchToNextDisplayColor(){