diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index 05bc4b63..7e86b46a 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -439,6 +439,14 @@ void Gui::hotKey(SDL_KeyboardEvent key) { if(isKeyPressed(configKeys.getSDLKey("HotKeySelectStoreUnit"),key) == true) { selectInterestingUnit(iutStore); } + //else if(key == configKeys.getCharKey("HotKeySelectedUnitsAttack")) { + if(isKeyPressed(configKeys.getSDLKey("HotKeySelectedUnitsAttack"),key) == true) { + clickCommonCommand(ccAttack); + } + //else if(key == configKeys.getCharKey("HotKeySelectedUnitsStop")) { + if(isKeyPressed(configKeys.getSDLKey("HotKeySelectedUnitsStop"),key) == true) { + clickCommonCommand(ccStop); + } for (int i=0; igetClass() == commandClass) || + display.getCommandClass(index) == commandClass) { + + mouseDownDisplayUnitSkills(index); + break; + } + } + computeDisplay(); +} + void Gui::mouseDownDisplayUnitSkills(int posDisplay) { if(selection.isEmpty() == false) { if(posDisplay != cancelPos) { diff --git a/source/glest_game/gui/gui.h b/source/glest_game/gui/gui.h index 396770a2..d44831b1 100644 --- a/source/glest_game/gui/gui.h +++ b/source/glest_game/gui/gui.h @@ -217,6 +217,7 @@ private: //hotkeys void centerCameraOnSelection(); void selectInterestingUnit(InterestingUnitType iut); + void clickCommonCommand(CommandClass commandClass); //misc int computePosDisplay(int x, int y);