- Timestamp:
- Sep 14, 2024, 6:20:50 PM (2 months ago)
- Location:
- trunk/LocalPlayer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/KeyBindings.pas
r614 r615 117 117 BRecover: TKeyBinding; 118 118 BUtilize: TKeyBinding; 119 BMoveLeftDown: TKeyBinding; 120 BMoveDown: TKeyBinding; 121 BMoveRightDown: TKeyBinding; 122 BMoveRight: TKeyBinding; 123 BMoveRightUp: TKeyBinding; 124 BMoveUp: TKeyBinding; 125 BMoveLeftUp: TKeyBinding; 126 BMoveLeft: TKeyBinding; 119 BUnitMoveLeftDown: TKeyBinding; 120 BUnitMoveDown: TKeyBinding; 121 BUnitMoveRightDown: TKeyBinding; 122 BUnitMoveRight: TKeyBinding; 123 BUnitMoveRightUp: TKeyBinding; 124 BUnitMoveUp: TKeyBinding; 125 BUnitMoveLeftUp: TKeyBinding; 126 BUnitMoveLeft: TKeyBinding; 127 BMapMoveLeftDown: TKeyBinding; 128 BMapMoveDown: TKeyBinding; 129 BMapMoveRightDown: TKeyBinding; 130 BMapMoveRight: TKeyBinding; 131 BMapMoveRightUp: TKeyBinding; 132 BMapMoveUp: TKeyBinding; 133 BMapMoveLeftUp: TKeyBinding; 134 BMapMoveLeft: TKeyBinding; 127 135 128 136 … … 382 390 BRecover := AddItem('Recover', 'Recover', 'V'); 383 391 BUtilize := AddItem('Utilize', 'Utilize', 'Z'); 384 BMoveLeftDown := AddItem('MoveLeftDown', 'Move unit left-down', 'Num1', 'End'); 385 BMoveDown := AddItem('MoveDown', 'Move unit down', 'Num2', 'Down'); 386 BMoveRightDown := AddItem('MoveRightDown', 'Move unit right-down', 'Num3', 'PgDn'); 387 BMoveRight := AddItem('MoveRight', 'Move unit right', 'Num6', 'Right'); 388 BMoveRightUp := AddItem('MoveRightUp', 'Move unit right-up', 'Num9', 'PgUp'); 389 BMoveUp := AddItem('MoveUp', 'Move unit up', 'Num8', 'Up'); 390 BMoveLeftUp := AddItem('MoveLeftUp', 'Move unit left-up', 'Num7', 'Home'); 391 BMoveLeft := AddItem('MoveLeft', 'Move unit left', 'Num4', 'Left'); 392 // Unit moves 393 BUnitMoveLeftDown := AddItem('MoveLeftDown', 'Move unit left-down', 'Num1', 'End'); 394 BUnitMoveDown := AddItem('MoveDown', 'Move unit down', 'Num2', 'Down'); 395 BUnitMoveRightDown := AddItem('MoveRightDown', 'Move unit right-down', 'Num3', 'PgDn'); 396 BUnitMoveRight := AddItem('MoveRight', 'Move unit right', 'Num6', 'Right'); 397 BUnitMoveRightUp := AddItem('MoveRightUp', 'Move unit right-up', 'Num9', 'PgUp'); 398 BUnitMoveUp := AddItem('MoveUp', 'Move unit up', 'Num8', 'Up'); 399 BUnitMoveLeftUp := AddItem('MoveLeftUp', 'Move unit left-up', 'Num7', 'Home'); 400 BUnitMoveLeft := AddItem('MoveLeft', 'Move unit left', 'Num4', 'Left'); 401 // Map moves 402 BMapMoveLeftDown := AddItem('MapMoveLeftDown', 'Move map left-down', 'Ctrl+Num1', 'Ctrl+End'); 403 BMapMoveDown := AddItem('MapMoveDown', 'Move map down', 'Ctrl+Num2', 'Ctrl+Down'); 404 BMapMoveRightDown := AddItem('MapMoveRightDown', 'Move map right-down', 'Ctrl+Num3', 'Ctrl+PgDn'); 405 BMapMoveRight := AddItem('MapMoveRight', 'Move map right', 'Ctrl+Num6', 'Ctrl+Right'); 406 BMapMoveRightUp := AddItem('MapMoveRightUp', 'Move map right-up', 'Ctrl+Num9', 'Ctrl+PgUp'); 407 BMapMoveUp := AddItem('MapMoveUp', 'Move map up', 'Ctrl+Num8', 'Ctrl+Up'); 408 BMapMoveLeftUp := AddItem('MapMoveLeftUp', 'Move map left-up', 'Ctrl+Num7', 'Ctrl+Home'); 409 BMapMoveLeft := AddItem('MapMoveLeft', 'Move map left', 'Ctrl+Num4', 'Ctrl+Left'); 410 392 411 SortAlpha; 393 412 end; … … 400 419 end. 401 420 402 -
trunk/LocalPlayer/Term.pas
r614 r615 13 13 Protocol, Tribes, PVSB, ClientTools, ScreenTools, BaseWin, Messg, ButtonBase, 14 14 LCLIntf, LCLType, Menus, SysUtils, Classes, DrawDlg, Types, Math, 15 DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area, 15 DateUtils, Platform, ButtonB, ButtonC, EOTButton, Area, Help, 16 16 GraphicSet, MiniMap, IsoEngine, Wonders, TechTree, Enhance, Nego, CityType, 17 17 Diagram, CityScreen, Rates, Battle, NatStat, UnitStat, Draft, Select, MessgEx, 18 Help,19 18 {$IFDEF DPI}Dpi.Graphics, Dpi.Controls, Dpi.Forms, Dpi.Menus, Dpi.ExtCtrls, 20 19 Dpi.PixelPointer, Dpi.Common, System.UITypes{$ELSE} … … 244 243 Shift: TShiftState; X, Y: Integer); 245 244 procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); 245 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); 246 246 procedure mDisbandOrUtilizeClick(Sender: TObject); 247 247 procedure FormResize(Sender: TObject); … … 270 270 procedure mNamesClick(Sender: TObject); 271 271 procedure MapBtnClick(Sender: TObject); 272 procedure FormKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);273 272 procedure CreateUnitClick(Sender: TObject); 274 273 procedure mSoundOffClick(Sender: TObject); … … 7120 7119 end; 7121 7120 7121 procedure DoMoveMap(X, Y: Integer); 7122 var 7123 ScrollSpeed: Integer; 7124 begin 7125 if mScrollFast.Checked then ScrollSpeed := 2 7126 else ScrollSpeed := 1; 7127 if (X <> 0) or (Y <> 0) then begin 7128 Scroll(X * ScrollSpeed, Y * ScrollSpeed); 7129 end; 7130 end; 7131 7122 7132 var 7123 7133 Time0, Time1: TDateTime; … … 7241 7251 InitPopup(TerrainPopup); 7242 7252 if mEnhance.Visible and mEnhance.Enabled then mEnhance.Click 7243 else mEnhanceDef.Click 7253 else mEnhanceDef.Click; 7244 7254 end 7245 7255 else if BGoOn.Test(ShortCut) then MenuClick_Check(UnitPopup, mGoOn) … … 7267 7277 else if BRecover.Test(ShortCut) then MenuClick_Check(UnitPopup, mRecover) 7268 7278 else if BUtilize.Test(ShortCut) then MenuClick_Check(UnitPopup, mUtilize) 7269 else if BMoveLeftDown.Test(ShortCut) then DoMoveUnit(-1, 1) 7270 else if BMoveDown.Test(ShortCut) then DoMoveUnit(0, 2) 7271 else if BMoveRightDown.Test(ShortCut) then DoMoveUnit(1, 1) 7272 else if BMoveLeft.Test(ShortCut) then DoMoveUnit(-2, 0) 7273 else if BMoveRight.Test(ShortCut) then DoMoveUnit(2, 0) 7274 else if BMoveLeftUp.Test(ShortCut) then DoMoveUnit(-1, -1) 7275 else if BMoveUp.Test(ShortCut) then DoMoveUnit(0, -2) 7276 else if BMoveRightUp.Test(ShortCut) then DoMoveUnit(1, -1); 7279 // Unit move 7280 else if BUnitMoveLeftDown.Test(ShortCut) then DoMoveUnit(-1, 1) 7281 else if BUnitMoveDown.Test(ShortCut) then DoMoveUnit(0, 2) 7282 else if BUnitMoveRightDown.Test(ShortCut) then DoMoveUnit(1, 1) 7283 else if BUnitMoveLeft.Test(ShortCut) then DoMoveUnit(-2, 0) 7284 else if BUnitMoveRight.Test(ShortCut) then DoMoveUnit(2, 0) 7285 else if BUnitMoveLeftUp.Test(ShortCut) then DoMoveUnit(-1, -1) 7286 else if BUnitMoveUp.Test(ShortCut) then DoMoveUnit(0, -2) 7287 else if BUnitMoveRightUp.Test(ShortCut) then DoMoveUnit(1, -1) 7288 // Map move 7289 else if BMapMoveLeftDown.Test(ShortCut) then DoMoveMap(-1, 1) 7290 else if BMapMoveDown.Test(ShortCut) then DoMoveMap(0, 2) 7291 else if BMapMoveRightDown.Test(ShortCut) then DoMoveMap(1, 1) 7292 else if BMapMoveLeft.Test(ShortCut) then DoMoveMap(-2, 0) 7293 else if BMapMoveRight.Test(ShortCut) then DoMoveMap(2, 0) 7294 else if BMapMoveLeftUp.Test(ShortCut) then DoMoveMap(-1, -1) 7295 else if BMapMoveUp.Test(ShortCut) then DoMoveMap(0, -2) 7296 else if BMapMoveRightUp.Test(ShortCut) then DoMoveMap(1, -1); 7277 7297 end; 7278 7298 end;
Note:
See TracChangeset
for help on using the changeset viewer.