add hotkeybuild1
This commit is contained in:
parent
22a474b93b
commit
ff9c9ad864
|
@ -447,6 +447,19 @@ void Gui::hotKey(SDL_KeyboardEvent key) {
|
||||||
else if(isKeyPressed(configKeys.getSDLKey("HotKeySelectedUnitsStop"),key) == true) {
|
else if(isKeyPressed(configKeys.getSDLKey("HotKeySelectedUnitsStop"),key) == true) {
|
||||||
clickCommonCommand(ccStop);
|
clickCommonCommand(ccStop);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
else if(isKeyPressed(configKeys.getSDLKey("HotKeyBuild1"),key) == true) {
|
||||||
|
const CommandType *ct;
|
||||||
|
for(int i=0; i<selection.getCount(); ++i){
|
||||||
|
const Unit *unit= selection.getUnit(i);
|
||||||
|
ct= unit->getType()->getFirstCtOfClass(ccBuild);
|
||||||
|
if(ct != NULL) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
clickCommonCommand(ct->getClass());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gui::switchToNextDisplayColor(){
|
void Gui::switchToNextDisplayColor(){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user