Improved toggle controls

This commit is contained in:
SilentSpike 2015-07-19 22:50:13 +01:00
parent cc9283ed96
commit e09342b7ea

View File

@ -160,6 +160,18 @@ switch (toLower _mode) do {
case 1: { // Esc case 1: { // Esc
[player,false] call FUNC(setSpectator); // Handle esc menu goes here, currently closes for purposes of testing [player,false] call FUNC(setSpectator); // Handle esc menu goes here, currently closes for purposes of testing
}; };
case 2: { // 1
GVAR(showUnit) = !GVAR(showUnit);
[] call FUNC(updateInterface);
};
case 3: { // 2
GVAR(showTool) = !GVAR(showTool);
[] call FUNC(updateInterface);
};
case 4: { // 3
GVAR(showComp) = !GVAR(showComp);
[] call FUNC(updateInterface);
};
case 14: { // Backspace case 14: { // Backspace
GVAR(showInterface) = !GVAR(showInterface); GVAR(showInterface) = !GVAR(showInterface);
[] call FUNC(updateInterface); [] call FUNC(updateInterface);
@ -170,14 +182,6 @@ switch (toLower _mode) do {
case 17: { // W case 17: { // W
GVAR(camDolly) set [0,true]; GVAR(camDolly) set [0,true];
}; };
case 20: { // T
GVAR(showTool) = !GVAR(showTool);
[] call FUNC(updateInterface);
};
case 22: { // U
GVAR(showUnit) = !GVAR(showUnit);
[] call FUNC(updateInterface);
};
case 29: { // Ctrl case 29: { // Ctrl
GVAR(ctrlKey) = true; GVAR(ctrlKey) = true;
}; };
@ -194,10 +198,6 @@ switch (toLower _mode) do {
GVAR(showHelp) = !GVAR(showHelp); GVAR(showHelp) = !GVAR(showHelp);
[] call FUNC(updateInterface); [] call FUNC(updateInterface);
}; };
case 37: { // K
GVAR(showComp) = !GVAR(showComp);
[] call FUNC(updateInterface);
};
case 44: { // Z case 44: { // Z
GVAR(camBoom) set [1,true]; GVAR(camBoom) set [1,true];
}; };