Changeset 90 for trunk/Forms
- Timestamp:
- Nov 16, 2014, 5:12:25 PM (10 years ago)
- Location:
- trunk/Forms
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r87 r90 11 11 const 12 12 ZoomFactor = 1.5; 13 MouseMinDiff = 6;13 MouseMinDiff = 0.1; 14 14 15 15 type … … 359 359 if Assigned(Core.Game.CurrentPlayer) then begin 360 360 if MoveActive then 361 if (Abs(StartMousePoint.X - X) > MouseMinDiff) or (Abs(StartMousePoint.Y - Y) > MouseMinDiff) then 361 if (Abs(StartMousePoint.X - X) > Trunc(Screen.PixelsPerInch * MouseMinDiff)) or 362 (Abs(StartMousePoint.Y - Y) > Trunc(Screen.PixelsPerInch * MouseMinDiff)) then 362 363 with Core.Game.CurrentPlayer do begin 363 364 if Mode = pmHuman then begin … … 390 391 Shift: TShiftState; X, Y: Integer); 391 392 begin 392 if (Abs(StartMousePoint.X - X) < MouseMinDiff) and (Abs(StartMousePoint.Y - Y) < MouseMinDiff) then begin 393 if (Abs(StartMousePoint.X - X) < Trunc(Screen.PixelsPerInch * MouseMinDiff)) and 394 (Abs(StartMousePoint.Y - Y) < Trunc(Screen.PixelsPerInch * MouseMinDiff)) then begin 393 395 if Core.Game.Running and (Core.Game.CurrentPlayer.Mode = pmHuman) then begin 394 396 Core.Game.CurrentPlayer.View.SelectCell(Point(X, Y), Core.Game.CurrentPlayer, Shift); -
trunk/Forms/UFormNew.pas
r82 r90 311 311 NewPlayer.Color := PlayerColors[Players.Count]; 312 312 NewPlayer.Mode := pmComputer; 313 NewPlayer.Agressivity := caMedium; 313 314 Players.Add(NewPlayer); 314 315 ReloadView; -
trunk/Forms/UFormPlayer.lfm
r29 r90 1 1 object FormPlayer: TFormPlayer 2 2 Left = 470 3 Height = 3 033 Height = 347 4 4 Top = 219 5 5 Width = 551 6 6 Caption = 'Player' 7 ClientHeight = 3 037 ClientHeight = 347 8 8 ClientWidth = 551 9 9 LCLVersion = '1.3' … … 26 26 Left = 307 27 27 Height = 25 28 Top = 2 5228 Top = 296 29 29 Width = 75 30 30 Anchors = [akRight, akBottom] … … 36 36 Left = 428 37 37 Height = 25 38 Top = 2 5238 Top = 296 39 39 Width = 75 40 40 Anchors = [akRight, akBottom] … … 83 83 TabOrder = 4 84 84 end 85 object Label4: TLabel 86 Left = 24 87 Height = 22 88 Top = 168 89 Width = 92 90 Caption = 'Agressivity:' 91 ParentColor = False 92 end 93 object ComboBoxAgressivity: TComboBox 94 Left = 139 95 Height = 30 96 Top = 168 97 Width = 368 98 ItemHeight = 0 99 Items.Strings = ( 100 'Low' 101 'Medium' 102 'High' 103 '' 104 ) 105 Style = csDropDownList 106 TabOrder = 5 107 end 108 object CheckBoxDefensive: TCheckBox 109 Left = 24 110 Height = 24 111 Top = 208 112 Width = 103 113 Caption = 'Defensive' 114 TabOrder = 6 115 end 85 116 end -
trunk/Forms/UFormPlayer.lrt
r29 r90 6 6 TFORMPLAYER.LABEL2.CAPTION=Mode: 7 7 TFORMPLAYER.LABEL3.CAPTION=Color: 8 TFORMPLAYER.LABEL4.CAPTION=Agressivity: 9 TFORMPLAYER.CHECKBOXDEFENSIVE.CAPTION=Defensive -
trunk/Forms/UFormPlayer.pas
r55 r90 16 16 ButtonCancel: TButton; 17 17 ButtonOk: TButton; 18 CheckBoxDefensive: TCheckBox; 18 19 ColorBox1: TColorBox; 19 20 ComboBox1: TComboBox; 21 ComboBoxAgressivity: TComboBox; 20 22 EditName: TEdit; 21 23 Label1: TLabel; 22 24 Label2: TLabel; 23 25 Label3: TLabel; 26 Label4: TLabel; 24 27 private 25 28 { private declarations } … … 40 43 SHuman = 'Human'; 41 44 SComputer = 'Computer'; 45 SAgroNotAttacking = 'Not attacking'; 46 SAgroLow = 'Low'; 47 SAgroMedium = 'Medium'; 48 SAgroHigh = 'High'; 42 49 43 50 { TFormPlayer } … … 54 61 ItemIndex := LastIndex; 55 62 end; 63 with ComboBoxAgressivity do begin 64 LastIndex := ItemIndex; 65 Clear; 66 Items.Add(SAgroLow); 67 Items.Add(SAgroMedium); 68 Items.Add(SAgroHigh); 69 ItemIndex := LastIndex; 70 end; 56 71 end; 57 72 … … 61 76 ComboBox1.ItemIndex := Integer(Player.Mode); 62 77 ColorBox1.Selected := Player.Color; 78 Label4.Visible := Player.Mode = pmComputer; 79 ComboBoxAgressivity.Visible := Player.Mode = pmComputer; 80 ComboBoxAgressivity.ItemIndex := Integer(Player.Agressivity); 81 CheckBoxDefensive.Visible := Player.Mode = pmComputer; 82 CheckBoxDefensive.Checked := Player.Defensive; 63 83 end; 64 84 … … 68 88 Player.Mode := TPlayerMode(ComboBox1.ItemIndex); 69 89 Player.Color := ColorBox1.Selected; 90 Player.Agressivity := TComputerAgressivity(ComboBoxAgressivity.ItemIndex); 91 Player.Defensive := CheckBoxDefensive.Checked; 70 92 end; 71 93
Note:
See TracChangeset
for help on using the changeset viewer.