Changeset 130 for trunk/Forms
- Timestamp:
- Jun 18, 2017, 11:27:44 AM (7 years ago)
- Location:
- trunk/Forms
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormCharts.pas
r128 r130 23 23 public 24 24 procedure Redraw; 25 procedure Translate; 25 26 end; 26 27 … … 34 35 uses 35 36 UCore, UGame; 37 38 resourcestring 39 SOccupiedCells = 'Occupied cells'; 40 SMilitaryPower = 'Military power'; 41 SDiscoveredCells = 'Discovered cells'; 42 SCitiesCount = 'Cities count'; 43 36 44 37 45 { TFormCharts } … … 50 58 begin 51 59 Core.PersistentForm.Load(Self); 60 if (ComboBox1.ItemIndex = -1) and (ComboBox1.Items.Count > 0) then 61 ComboBox1.ItemIndex := 0; 52 62 Redraw; 63 Translate; 53 64 end; 54 65 … … 74 85 end; 75 86 87 procedure TFormCharts.Translate; 88 var 89 LastIndex: Integer; 90 begin 91 with ComboBox1 do begin 92 LastIndex := ItemIndex; 93 Clear; 94 Items.Add(SOccupiedCells); 95 Items.Add(SMilitaryPower); 96 Items.Add(SDiscoveredCells); 97 Items.Add(SCitiesCount); 98 ItemIndex := LastIndex; 99 end; 100 end; 101 76 102 end. 77 103 -
trunk/Forms/UFormNew.lfm
r107 r130 13 13 OnShow = FormShow 14 14 Position = poMainFormCenter 15 LCLVersion = '1. 4.4.0'15 LCLVersion = '1.6.4.0' 16 16 object ButtonCancel: TButton 17 17 Left = 454 … … 47 47 object TabSheet1: TTabSheet 48 48 Caption = 'Players' 49 ClientHeight = 39 850 ClientWidth = 85449 ClientHeight = 397 50 ClientWidth = 663 51 51 object ListView1: TListView 52 52 Left = 4 53 Height = 34 853 Height = 347 54 54 Top = 4 55 Width = 84655 Width = 655 56 56 Align = alTop 57 57 Anchors = [akTop, akLeft, akRight, akBottom] … … 90 90 Left = 224 91 91 Height = 25 92 Top = 3 6092 Top = 359 93 93 Width = 83 94 94 Action = APlayerRemove … … 99 99 Left = 16 100 100 Height = 25 101 Top = 3 60101 Top = 359 102 102 Width = 83 103 103 Action = APlayerAdd … … 108 108 Left = 120 109 109 Height = 25 110 Top = 3 60110 Top = 359 111 111 Width = 83 112 112 Action = APlayerModify … … 118 118 object TabSheet2: TTabSheet 119 119 Caption = 'Map' 120 ClientHeight = 401121 ClientWidth = 66 1120 ClientHeight = 397 121 ClientWidth = 663 122 122 object Label1: TLabel 123 123 Left = 8 124 Height = 2 5124 Height = 24 125 125 Top = 9 126 Width = 89126 Width = 95 127 127 Caption = 'Map width:' 128 128 ParentColor = False … … 130 130 object Label2: TLabel 131 131 Left = 8 132 Height = 2 5132 Height = 24 133 133 Top = 57 134 Width = 95134 Width = 102 135 135 Caption = 'Map height:' 136 136 ParentColor = False … … 138 138 object SpinEditMapSizeX: TSpinEdit 139 139 Left = 128 140 Height = 3 3140 Height = 34 141 141 Top = 4 142 142 Width = 98 … … 148 148 object SpinEditMapSizeY: TSpinEdit 149 149 Left = 128 150 Height = 3 3150 Height = 34 151 151 Top = 55 152 152 Width = 98 … … 160 160 Height = 46 161 161 Top = 8 162 Width = 41 0162 Width = 412 163 163 Max = 100 164 164 Min = 2 … … 173 173 Height = 46 174 174 Top = 49 175 Width = 41 0175 Width = 412 176 176 Max = 100 177 177 Min = 2 … … 184 184 object Label5: TLabel 185 185 Left = 8 186 Height = 2 5186 Height = 24 187 187 Top = 104 188 Width = 77188 Width = 83 189 189 Caption = 'Grid type:' 190 190 ParentColor = False … … 192 192 object ComboBoxGridType: TComboBox 193 193 Left = 146 194 Height = 3 3194 Height = 34 195 195 Top = 104 196 196 Width = 208 197 ItemHeight = 25197 ItemHeight = 0 198 198 Items.Strings = ( 199 199 'Hexagonal' … … 206 206 object ComboBoxMapShape: TComboBox 207 207 Left = 146 208 Height = 3 3208 Height = 34 209 209 Top = 144 210 210 Width = 208 211 ItemHeight = 25211 ItemHeight = 0 212 212 Items.Strings = ( 213 213 'Hexagonal' … … 221 221 object Label8: TLabel 222 222 Left = 8 223 Height = 2 5223 Height = 24 224 224 Top = 144 225 Width = 9 2225 Width = 98 226 226 Caption = 'Map shape:' 227 227 ParentColor = False … … 231 231 Height = 27 232 232 Top = 110 233 Width = 17 3233 Width = 175 234 234 Anchors = [akTop, akLeft, akRight] 235 235 AutoSize = False … … 239 239 object SpinEditVoidPercent: TSpinEdit 240 240 Left = 216 241 Height = 3 3241 Height = 34 242 242 Top = 224 243 243 Width = 106 … … 248 248 object CheckBoxVoid: TCheckBox 249 249 Left = 8 250 Height = 2 9250 Height = 28 251 251 Top = 232 252 Width = 1 77252 Width = 187 253 253 Caption = 'Inaccessible places' 254 254 OnChange = CheckBoxVoidChange … … 257 257 object CheckBoxCity: TCheckBox 258 258 Left = 8 259 Height = 2 9259 Height = 28 260 260 Top = 272 261 Width = 7 2261 Width = 71 262 262 Caption = 'Cities' 263 263 OnChange = CheckBoxCityChange … … 266 266 object SpinEditCityPercent: TSpinEdit 267 267 Left = 216 268 Height = 3 3268 Height = 34 269 269 Top = 272 270 270 Width = 106 … … 275 275 object Label4: TLabel 276 276 Left = 331 277 Height = 2 5277 Height = 24 278 278 Top = 272 279 279 Width = 15 … … 283 283 object Label3: TLabel 284 284 Left = 331 285 Height = 2 5285 Height = 24 286 286 Top = 232 287 287 Width = 15 … … 291 291 object SpinEditNeutralUnits: TSpinEdit 292 292 Left = 408 293 Height = 3 3293 Height = 34 294 294 Top = 352 295 295 Width = 98 … … 301 301 object Label7: TLabel 302 302 Left = 8 303 Height = 2 5303 Height = 24 304 304 Top = 352 305 Width = 2 07305 Width = 227 306 306 Caption = 'Max random neutral units:' 307 307 ParentColor = False … … 309 309 object EditImageFile: TEdit 310 310 Left = 144 311 Height = 3 3311 Height = 34 312 312 Top = 184 313 Width = 39 4313 Width = 396 314 314 Anchors = [akTop, akLeft, akRight] 315 315 TabOrder = 12 316 316 end 317 317 object ButtonImageBrowse: TButton 318 Left = 54 6318 Left = 548 319 319 Height = 25 320 320 Top = 192 … … 327 327 object Label9: TLabel 328 328 Left = 8 329 Height = 2 5329 Height = 24 330 330 Top = 184 331 Width = 82331 Width = 90 332 332 Caption = 'Image file:' 333 333 ParentColor = False … … 335 335 object CheckBoxBridges: TCheckBox 336 336 Left = 8 337 Height = 2 9337 Height = 28 338 338 Top = 310 339 Width = 199339 Width = 210 340 340 Caption = 'Bridges between cells' 341 341 TabOrder = 14 … … 344 344 object TabSheet3: TTabSheet 345 345 Caption = 'Rules' 346 ClientHeight = 39 8347 ClientWidth = 854346 ClientHeight = 397 347 ClientWidth = 663 348 348 object RadioGroupGrowCells: TRadioGroup 349 349 Left = 15 … … 360 360 ChildSizing.Layout = cclLeftToRightThenTopToBottom 361 361 ChildSizing.ControlsPerLine = 1 362 ClientHeight = 7 5362 ClientHeight = 79 363 363 ClientWidth = 308 364 364 Items.Strings = ( … … 382 382 Top = 240 383 383 Width = 328 384 ItemHeight = 25384 ItemHeight = 0 385 385 Items.Strings = ( 386 386 'Defeat all oponents' … … 406 406 ChildSizing.Layout = cclLeftToRightThenTopToBottom 407 407 ChildSizing.ControlsPerLine = 1 408 ClientHeight = 46408 ClientHeight = 50 409 409 ClientWidth = 301 410 410 Items.Strings = ( -
trunk/Forms/UFormNew.pas
r125 r130 90 90 procedure Translate; 91 91 procedure ReloadView; 92 procedure UpdateInterface; 92 93 procedure Load(Game: TGame); 93 94 procedure Save(Game: TGame); … … 229 230 ListView1.Items.Count := Players.Count; 230 231 ListView1.Refresh; 231 ButtonPlayerRemove.Enabled := Assigned(ListView1.Selected) and (Players.Count > 1); 232 ButtonPlayerAdd.Enabled := Players.Count < MaxPlayerCount; 232 Translate; 233 UpdateInterface; 234 end; 235 236 procedure TFormNew.UpdateInterface; 237 begin 238 APlayerRemove.Enabled := Assigned(ListView1.Selected) and (Players.Count > 2); 239 APlayerAdd.Enabled := Players.Count < MaxPlayerCount; 233 240 APlayerModify.Enabled := Assigned(ListView1.Selected); 234 241 EditImageFile.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage); 235 242 ButtonImageBrowse.Enabled := ComboBoxMapShape.ItemIndex = Integer(msImage); 236 Translate;237 243 end; 238 244
Note:
See TracChangeset
for help on using the changeset viewer.