Changeset 377
- Timestamp:
- Jan 3, 2025, 11:20:28 PM (5 days ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ClientGUI.pas
r334 r377 17 17 procedure SetZoom(AValue: Double); 18 18 public 19 Game: TObject; // TGame;19 Game: TObject; // TGame; 20 20 SourceRect: TRect; 21 21 FocusedCell: TPlayerCell; -
trunk/Core.pas
r375 r377 370 370 Server.Game := Game; 371 371 Game.Running := False; 372 Game.PostConfig;373 372 Game.Assign(NewServer.Game); 374 373 GameSettings.Assign(NewServer.Game); … … 738 737 739 738 if Game.FileName = '' then begin 740 GameSettings.PostConfig;741 739 Game.Assign(GameSettings); 742 740 StartNewGame; -
trunk/Forms/FormMove.lfm
r373 r377 1 1 object FormMove: TFormMove 2 Left = 11043 Height = 2994 Top = 6045 Width = 4 672 Left = 938 3 Height = 318 4 Top = 539 5 Width = 493 6 6 ActiveControl = ButtonOk 7 7 Caption = 'Move' 8 ClientHeight = 2999 ClientWidth = 4 678 ClientHeight = 318 9 ClientWidth = 493 10 10 Constraints.MinHeight = 100 11 11 Constraints.MinWidth = 350 … … 16 16 LCLVersion = '3.6.0.0' 17 17 object ButtonOk: TButton 18 Left = 1 3418 Left = 160 19 19 Height = 38 20 Top = 2 5320 Top = 272 21 21 Width = 100 22 22 Anchors = [akRight, akBottom] … … 28 28 end 29 29 object ButtonCancel: TButton 30 Left = 2 4630 Left = 272 31 31 Height = 38 32 Top = 2 5332 Top = 272 33 33 Width = 100 34 34 Anchors = [akRight, akBottom] … … 38 38 TabOrder = 1 39 39 end 40 object LabelWinProbability: TLabel41 Left = 26442 Height = 2643 Top = 844 Width = 1545 Caption = ' '46 ParentColor = False47 ParentFont = False48 end49 40 object ButtonRemove: TButton 50 Left = 3 5841 Left = 384 51 42 Height = 38 52 Top = 2 5343 Top = 272 53 44 Width = 100 54 45 Anchors = [akRight, akBottom] … … 60 51 object ScrollBox1: TScrollBox 61 52 Left = 8 62 Height = 2 3153 Height = 250 63 54 Top = 8 64 Width = 4 5155 Width = 477 65 56 HorzScrollBar.Page = 298 66 VertScrollBar.Page = 2 1457 VertScrollBar.Page = 222 67 58 Align = alTop 68 59 Anchors = [akTop, akLeft, akRight, akBottom] 69 60 BorderSpacing.Around = 8 70 ClientHeight = 2 2971 ClientWidth = 4 4961 ClientHeight = 248 62 ClientWidth = 475 72 63 TabOrder = 3 73 64 object Label3: TLabel … … 83 74 Left = 8 84 75 Height = 26 85 Top = 4876 Top = 56 86 77 Width = 49 87 78 Caption = 'Once:' … … 92 83 Left = 200 93 84 Height = 43 94 Top = 4 085 Top = 48 95 86 Width = 98 96 87 OnChange = SpinEditOnceChange … … 102 93 Left = 8 103 94 Height = 38 104 Top = 8895 Top = 96 105 96 Width = 80 106 97 Caption = 'Min' … … 111 102 object TrackBarOnce: TTrackBar 112 103 Left = 96 113 Height = 58114 Top = 80115 Width = 2 56104 Height = 30 105 Top = 104 106 Width = 282 116 107 OnChange = TrackBarOnceChange 117 108 PageSize = 1 … … 124 115 end 125 116 object ButtonOnceMax: TButton 126 Left = 3 61117 Left = 387 127 118 Height = 38 128 Top = 88119 Top = 96 129 120 Width = 80 130 121 Anchors = [akTop, akRight] … … 135 126 end 136 127 object ButtonRepeatMax: TButton 137 Left = 3 61128 Left = 387 138 129 Height = 38 139 Top = 1 76130 Top = 184 140 131 Width = 80 141 132 Anchors = [akTop, akRight] … … 148 139 Left = 200 149 140 Height = 43 150 Top = 1 28141 Top = 136 151 142 Width = 98 152 143 OnChange = SpinEditRepeatChange … … 158 149 Left = 96 159 150 Height = 30 160 Top = 18 0161 Width = 2 56151 Top = 188 152 Width = 282 162 153 OnChange = TrackBarRepeatChange 163 154 PageSize = 1 … … 172 163 Left = 8 173 164 Height = 38 174 Top = 1 76165 Top = 184 175 166 Width = 80 176 167 Caption = 'Min' … … 182 173 Left = 8 183 174 Height = 26 184 Top = 1 36175 Top = 144 185 176 Width = 90 186 177 Caption = 'Every turn:' … … 188 179 ParentFont = False 189 180 end 181 object LabelWinProbability: TLabel 182 Left = 264 183 Height = 26 184 Top = 8 185 Width = 15 186 Caption = ' ' 187 ParentColor = False 188 ParentFont = False 189 end 190 190 end 191 191 end -
trunk/Forms/FormMove.lrj
r365 r377 3 3 {"hash":1371,"name":"tformmove.buttonok.caption","sourcebytes":[79,107],"value":"Ok"}, 4 4 {"hash":77089212,"name":"tformmove.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"}, 5 {"hash":8736,"name":"tformmove.labelwinprobability.caption","sourcebytes":[32,32,32],"value":" "},6 5 {"hash":78392485,"name":"tformmove.buttonremove.caption","sourcebytes":[68,101,108,101,116,101],"value":"Delete"}, 7 6 {"hash":261993402,"name":"tformmove.label3.caption","sourcebytes":[87,105,110,32,112,114,111,98,97,98,105,108,105,116,121,58],"value":"Win probability:"}, … … 11 10 {"hash":21384,"name":"tformmove.buttonrepeatmax.caption","sourcebytes":[77,97,120],"value":"Max"}, 12 11 {"hash":21502,"name":"tformmove.buttonrepeatmin.caption","sourcebytes":[77,105,110],"value":"Min"}, 13 {"hash":188155274,"name":"tformmove.label2.caption","sourcebytes":[69,118,101,114,121,32,116,117,114,110,58],"value":"Every turn:"} 12 {"hash":188155274,"name":"tformmove.label2.caption","sourcebytes":[69,118,101,114,121,32,116,117,114,110,58],"value":"Every turn:"}, 13 {"hash":8736,"name":"tformmove.labelwinprobability.caption","sourcebytes":[32,32,32],"value":" "} 14 14 ]} -
trunk/Forms/FormNew.pas
r363 r377 384 384 GamePreview.GameSystem.Assign(FServer.Game.GameSystem); 385 385 SaveGame(GamePreview); 386 GamePreview.PostConfig;387 386 GamePreview.GeneratePlayers := False; 388 387 GamePreview.New; -
trunk/Game.pas
r360 r377 86 86 StoredRandSeed: Cardinal; 87 87 GeneratePlayers: Boolean; 88 procedure PostConfig;89 88 procedure Assign(Source: TGame); 90 89 function AttackProbability(AttackCount, DefendCount: Integer): Double; … … 297 296 Cell: TCell; 298 297 begin 298 // Load map image 299 if (Map.Shape = msImage) then begin 300 if LoadedImageFileName <> MapImageFileName then begin 301 LoadedImageFileName := MapImageFileName; 302 if FileExists(MapImageFileName) then begin 303 Map.Image.Picture.LoadFromFile(MapImageFileName) 304 end else begin 305 LoadedImageFileName := ''; 306 Map.Image.Picture.Clear; 307 end; 308 end; 309 end; 310 299 311 // Randomize map terrain 300 312 for Cell in Map.Cells do … … 376 388 end; 377 389 378 procedure TGame.PostConfig;379 begin380 if (Map.Shape = msImage) and FileExists(MapImageFileName) and381 (LoadedImageFileName <> MapImageFileName) then begin382 LoadedImageFileName := MapImageFileName;383 Map.Image.Picture.LoadFromFile(MapImageFileName);384 end;385 end;386 387 390 procedure TGame.SelectPlayerStartCell(Player: TPlayer); 388 391 var … … 502 505 Map.Assign(Source.Map); 503 506 MapImageFileName := Source.MapImageFileName; 507 LoadedImageFileName := Source.LoadedImageFileName; 504 508 VoidEnabled := Source.VoidEnabled; 505 509 VoidPercentage := Source.VoidPercentage;
Note:
See TracChangeset
for help on using the changeset viewer.