refactor: remove some useless code,
since we removed this hotkeys, we don't need this code any more
This commit is contained in:
parent
a5438f6a93
commit
afc26199f7
|
@ -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) {
|
||||
|
|
|
@ -217,7 +217,6 @@ private:
|
|||
//hotkeys
|
||||
void centerCameraOnSelection();
|
||||
void selectInterestingUnit(InterestingUnitType iut);
|
||||
void clickCommonCommand(CommandClass commandClass);
|
||||
|
||||
//misc
|
||||
int computePosDisplay(int x, int y);
|
||||
|
|
Loading…
Reference in New Issue