Skip to content

Commit 6751ca2

Browse files
Rampoinaandy5995
authored andcommitted
add hotkeybuild1
1 parent a3a01ea commit 6751ca2

File tree

5 files changed

+43
-16
lines changed

5 files changed

+43
-16
lines changed

docs/README.txt

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ the default keyboard values).
149149

150150
* Camera keyboard controls *
151151

152-
f => toggle free camera mode
152+
y => toggle free camera mode
153153
w => move camera up (free camera mode only)
154154
s => move camera down (free camera mode only)
155155
a => rotate camera left (free camera mode only)
@@ -185,21 +185,34 @@ n => show network status
185185

186186
* Hotkeys (game camera mode only) *
187187

188-
a => activate attack command for selection
189-
s => issue stop command to selection
188+
, => activate attack command for selection
189+
; => issue stop command to selection
190190
i => select next idle harvester
191191
b => select next building
192-
d => select next damaged unit
192+
u => select next damaged unit
193193
t => select next storage unit
194194
r => rotate building before placement
195195

196+
Unit commands can be activated using the keyboard by pressing corresponding
197+
keys in the grid layout:
198+
199+
+---+---+---+---+
200+
| q | w | e | r |
201+
+---+---+---+---+
202+
| a | s | d | f |
203+
+---+---+---+---+
204+
| z | x | c | v |
205+
+---+---+---+---+
206+
207+
The position of the command for the selected unit (or group) in the UI
208+
button grid corresponds to the key in the same position in the grid above.
196209

197210
* Other Keys *
198211

199212
- + => adjust game speed (disabled in multiplayer)
200213
p => pause game (disabled in multiplayer)
201-
e => save screen shot to file
202-
c => toggle ingame font color (and font shadow)
214+
j => save screen shot to file
215+
o => toggle ingame font color (and font shadow)
203216
m => show faded mesages again
204217
? => when DebugMode=true, display debug info
205218
/ => toggle mouse pointer rendering mode (OS/MG)

mk/shared/glestkeys.ini

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
RenderInGamePerformance=`
44
RenderNetworkStatus=N
55
ShowFullConsole=M
6-
Screenshot=E
7-
FreeCameraMode=F
6+
Screenshot=J
7+
FreeCameraMode=Y
88
ResetCameraMode=space
99
CameraModeLeft=left
1010
CameraModeRight=right
1111
CameraModeUp=up
1212
CameraModeDown=down
1313
PauseGame=P
14-
ChangeFontColor=C
14+
ChangeFontColor=O
1515
GameSpeedIncrease='+'
1616
GameSpeedDecrease='-'
1717
ExitKey=escape
@@ -30,16 +30,28 @@ CameraRotateLeft=A
3030
CameraRotateRight=D
3131
CameraRotateUp=S
3232
CameraRotateDown=W
33+
CommandKey1=Q
34+
CommandKey2=W
35+
CommandKey3=E
36+
CommandKey4=R
37+
CommandKey5=A
38+
CommandKey6=S
39+
CommandKey7=D
40+
CommandKey8=F
41+
CommandKey9=Z
42+
CommandKey10=X
43+
CommandKey11=C
44+
CommandKey12=V
3345
HotKeyCenterCameraOnSelection=G
3446
HotKeySelectIdleHarvesterUnit=I
3547
HotKeySelectBuiltBuilding=B
3648
HotKeyShowDebug=?
3749
HotKeyDumpWorldToLog=\
3850
HotKeyRotateUnitDuringPlacement=R
39-
HotKeySelectDamagedUnit=D
51+
HotKeySelectDamagedUnit=U
4052
HotKeySelectStoreUnit=T
41-
HotKeySelectedUnitsAttack=A
42-
HotKeySelectedUnitsStop=S
53+
HotKeySelectedUnitsAttack=,
54+
HotKeySelectedUnitsStop=;
4355
HotKeyToggleOSMouseEnabled=/
4456
ChatTeamMode=H
4557
ToggleHealthbars=#

source/glest_game/gui/gui.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace Glest {
3838
namespace Game {
3939

4040
// =====================================================
41-
// class Mouse3d
41+
// class Mouse3d
4242
// =====================================================
4343

4444
const float Mouse3d::fadeSpeed = 1.f / 50.f;
@@ -65,7 +65,7 @@ void Mouse3d::update() {
6565
}
6666

6767
// ===============================
68-
// class SelectionQuad
68+
// class SelectionQuad
6969
// ===============================
7070

7171
SelectionQuad::SelectionQuad() {
@@ -89,7 +89,7 @@ void SelectionQuad::disable() {
8989
}
9090

9191
// =====================================================
92-
// class Gui
92+
// class Gui
9393
// =====================================================
9494

9595
// constructor

source/glest_game/gui/gui.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ class SelectionQuad {
8484
};
8585

8686
// =====================================================
87-
// class Gui
87+
// class Gui
8888
//
8989
/// In game GUI
9090
// =====================================================

source/glest_game/types/unit_type.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ class UnitType : public ProducibleType, public ValueCheckerVault {
194194
// info
195195
SkillTypes skillTypes;
196196
CommandTypes commandTypes;
197+
CommandTypes commandTypesSorted;
197198
StoredResources storedResources;
198199
Levels levels;
199200
LootableResources lootableResources;
@@ -334,6 +335,7 @@ class UnitType : public ProducibleType, public ValueCheckerVault {
334335
private:
335336
void computeFirstStOfClass();
336337
void computeFirstCtOfClass();
338+
void sortCommandTypes(CommandTypes cts);
337339
};
338340

339341
/**

0 commit comments

Comments
 (0)