Bump Command Keys to 12

Otherwise some units in the game don't have enough hotkeys like the
ballista.
Moves the hotkey for attacking units to ,
Moves the hotkey for font cOlor to O
This commit is contained in:
Rampoina 2022-08-02 09:44:46 +02:00
parent e209dcbd35
commit 46d5904578
3 changed files with 7 additions and 4 deletions

View File

@ -11,7 +11,7 @@ CameraModeRight=right
CameraModeUp=up
CameraModeDown=down
PauseGame=P
ChangeFontColor=C
ChangeFontColor=O
GameSpeedIncrease='+'
GameSpeedDecrease='-'
ExitKey=escape
@ -40,6 +40,8 @@ CommandKey7=D
CommandKey8=F
CommandKey9=Z
CommandKey10=X
CommandKey11=C
CommandKey12=V
HotKeyCenterCameraOnSelection=G
HotKeySelectIdleHarvesterUnit=I
HotKeySelectBuiltBuilding=B
@ -48,7 +50,7 @@ HotKeyDumpWorldToLog=\
HotKeyRotateUnitDuringPlacement=R
HotKeySelectDamagedUnit=U
HotKeySelectStoreUnit=T
HotKeySelectedUnitsAttack=V
HotKeySelectedUnitsAttack=,
HotKeySelectedUnitsStop=;
HotKeyToggleOSMouseEnabled=/
ChatTeamMode=H

View File

@ -449,7 +449,7 @@ void Gui::hotKey(SDL_KeyboardEvent key) {
clickCommonCommand(ccStop);
}
for (int i=0; i<10; i++) {
for (int i=0; i<commandKeys; i++) {
string name = "CommandKey" + intToStr(i+1);
if(isKeyPressed(configKeys.getSDLKey(name.c_str()),key) == true) {
if(activeCommandType != NULL && activeCommandType->getClass() == ccBuild) {
@ -807,7 +807,7 @@ void Gui::computeInfoString(int posDisplay){
if(posDisplay!=invalidPos && selection.isCommandable()){
string hotkey = "";
if (posDisplay < 10) { // there's 10 configurable command hotkeys
if (posDisplay < commandKeys) {
hotkey=lang.getString("HotKey")+": "+SDL_GetKeyName(configKeys.getSDLKey(commandKeyName.c_str())) +"\n\n";
}
if(!selectingBuilding){

View File

@ -95,6 +95,7 @@ public:
class Gui {
public:
static const int commandKeys= 12;
static const int maxSelBuff= 128*5;
static const int upgradeDisplayIndex= 8;