refactor: remove some useless code,

since we removed this hotkeys, we don't need this code any more
This commit is contained in:
pavanvo 2022-08-16 21:56:36 +04:00
parent a5438f6a93
commit afc26199f7
No known key found for this signature in database
GPG Key ID: 34C1C36681B4AD84
2 changed files with 0 additions and 23 deletions

View File

@ -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; i<commandKeys; i++) {
string name = "CommandKey" + intToStr(i+1);
@ -645,20 +637,6 @@ void Gui::selectInterestingUnit(InterestingUnitType iut) {
}
}
void Gui::clickCommonCommand(CommandClass commandClass) {
for(int index = 0; index < Display::downCellCount; ++index) {
const CommandType *ct = display.getCommandType(index);
if((ct != NULL && ct->getClass() == commandClass) ||
display.getCommandClass(index) == commandClass) {
mouseDownDisplayUnitSkills(index);
break;
}
}
computeDisplay();
}
void Gui::mouseDownDisplayUnitSkills(int posDisplay) {
if(selection.isEmpty() == false) {
if(posDisplay != cancelPos) {

View File

@ -217,7 +217,6 @@ private:
//hotkeys
void centerCameraOnSelection();
void selectInterestingUnit(InterestingUnitType iut);
void clickCommonCommand(CommandClass commandClass);
//misc
int computePosDisplay(int x, int y);