From afc26199f7980757857c2bfb949fd225ec4a260f Mon Sep 17 00:00:00 2001 From: pavanvo Date: Tue, 16 Aug 2022 21:56:36 +0400 Subject: [PATCH] refactor: remove some useless code, since we removed this hotkeys, we don't need this code any more --- source/glest_game/gui/gui.cpp | 22 ---------------------- source/glest_game/gui/gui.h | 1 - 2 files changed, 23 deletions(-) diff --git a/source/glest_game/gui/gui.cpp b/source/glest_game/gui/gui.cpp index 96190200..8ace6f90 100644 --- a/source/glest_game/gui/gui.cpp +++ b/source/glest_game/gui/gui.cpp @@ -439,14 +439,6 @@ 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 d44831b1..396770a2 100644 --- a/source/glest_game/gui/gui.h +++ b/source/glest_game/gui/gui.h @@ -217,7 +217,6 @@ private: //hotkeys void centerCameraOnSelection(); void selectInterestingUnit(InterestingUnitType iut); - void clickCommonCommand(CommandClass commandClass); //misc int computePosDisplay(int x, int y);