Changeset 344 for trunk/Forms
- Timestamp:
- Dec 23, 2024, 8:16:05 AM (4 weeks ago)
- Location:
- trunk/Forms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormCharts.pas
r318 r344 62 62 Chart1.Series.Clear; 63 63 for I := 0 to Game.Players.Count - 1 do 64 with TPlayer(Game.Players[I])do begin64 with Game.Players[I] do begin 65 65 NewSeries := TLineSeries.Create(nil); 66 66 NewSeries.LinePen.Color := Color; -
trunk/Forms/FormGameSystem.lfm
r330 r344 1 1 object FormGameSystem: TFormGameSystem 2 2 Left = 954 3 Height = 4 823 Height = 402 4 4 Top = 479 5 Width = 6515 Width = 542 6 6 Caption = 'Game system' 7 ClientHeight = 4 828 ClientWidth = 6519 DesignTimePPI = 1 447 ClientHeight = 402 8 ClientWidth = 542 9 DesignTimePPI = 120 10 10 OnCreate = FormCreate 11 11 OnDestroy = FormDestroy 12 LCLVersion = '3. 4.0.0'12 LCLVersion = '3.6.0.0' 13 13 object ButtonSave: TButton 14 Left = 1 6015 Height = 3 816 Top = 43217 Width = 11314 Left = 133 15 Height = 32 16 Top = 360 17 Width = 94 18 18 Anchors = [akLeft, akBottom] 19 19 Caption = 'Save' … … 23 23 end 24 24 object ButtonLoad: TButton 25 Left = 2 426 Height = 3 827 Top = 43228 Width = 11325 Left = 20 26 Height = 32 27 Top = 360 28 Width = 94 29 29 Anchors = [akLeft, akBottom] 30 30 Caption = 'Load' … … 34 34 end 35 35 object ButtonCancel: TButton 36 Left = 3 7437 Height = 3 838 Top = 43239 Width = 11336 Left = 311 37 Height = 32 38 Top = 360 39 Width = 94 40 40 Anchors = [akRight, akBottom] 41 41 Caption = 'Cancel' … … 45 45 end 46 46 object ButtonOk: TButton 47 Left = 51648 Height = 3 849 Top = 43250 Width = 11347 Left = 430 48 Height = 32 49 Top = 360 50 Width = 94 51 51 Anchors = [akRight, akBottom] 52 52 Caption = 'OK' … … 56 56 end 57 57 object PageControl1: TPageControl 58 Left = 1 659 Height = 40060 Top = 1 661 Width = 61358 Left = 13 59 Height = 334 60 Top = 13 61 Width = 511 62 62 ActivePage = TabSheetGeneral 63 63 Anchors = [akTop, akLeft, akRight, akBottom] … … 67 67 object TabSheetGeneral: TTabSheet 68 68 Caption = 'General' 69 ClientHeight = 3 6270 ClientWidth = 60569 ClientHeight = 301 70 ClientWidth = 503 71 71 ParentFont = False 72 72 object CheckBoxEmptyCellsNeutral: TCheckBox 73 Left = 1 674 Height = 2 975 Top = 1 676 Width = 33073 Left = 13 74 Height = 24 75 Top = 13 76 Width = 277 77 77 Caption = 'Set cells without player units as neutral' 78 78 ParentFont = False … … 80 80 end 81 81 object CheckBoxUnitsSplitMerge: TCheckBox 82 Left = 1 683 Height = 2 984 Top = 5585 Width = 21382 Left = 13 83 Height = 24 84 Top = 46 85 Width = 178 86 86 Caption = 'Units can split or merge' 87 87 ParentFont = False … … 89 89 end 90 90 object CheckBoxUnitsMoveImmediately: TCheckBox 91 Left = 1 692 Height = 2 993 Top = 9594 Width = 21791 Left = 13 92 Height = 24 93 Top = 79 94 Width = 182 95 95 Caption = 'Units move immediately' 96 96 ParentFont = False … … 98 98 end 99 99 object Label5: TLabel 100 Left = 1 6101 Height = 2 5102 Top = 1 36103 Width = 1 53100 Left = 13 101 Height = 20 102 Top = 113 103 Width = 128 104 104 Caption = 'Preferred grid type:' 105 105 ParentColor = False … … 107 107 end 108 108 object ComboBoxPreferredGridType: TComboBox 109 Left = 2 72110 Height = 33111 Top = 1 36112 Width = 304113 ItemHeight = 2 5109 Left = 227 110 Height = 28 111 Top = 113 112 Width = 253 113 ItemHeight = 20 114 114 Items.Strings = ( 115 115 'None' … … 140 140 end 141 141 object OpenDialog1: TOpenDialog 142 Left = 440143 Top = 1 60142 Left = 367 143 Top = 133 144 144 end 145 145 object SaveDialog1: TSaveDialog 146 Left = 232147 Top = 1 60146 Left = 193 147 Top = 133 148 148 end 149 149 end -
trunk/Forms/FormGameSystem.pas
r330 r344 51 51 52 52 uses 53 MapType ;53 MapType, ItemList; 54 54 55 55 resourcestring -
trunk/Forms/FormItem.pas
r321 r344 80 80 J: Integer; 81 81 Control: TControl; 82 ReferenceList: TItemList ;82 ReferenceList: TItemList<TItem>; 83 83 ReferenceItem: TItem; 84 84 begin … … 106 106 try 107 107 TComboBox(Control).Items.Clear; 108 ReferenceList := Item.GetReferenceList(Index);108 ReferenceList := TItemList<TItem>(Item.GetReferenceList(Index)); 109 109 if Assigned(ReferenceList) then 110 110 for J := 0 to ReferenceList.Count - 1 do -
trunk/Forms/FormList.pas
r317 r344 46 46 Selected: Boolean); 47 47 private 48 FList: TItemList;49 procedure SetList(AValue: TItemList);48 FList: IList<TItem>; 49 procedure SetList(AValue: IList<TItem>); 50 50 procedure UpdateListViewColumns; 51 51 public … … 54 54 procedure UpdateInterface; 55 55 procedure UpdateList; 56 property List: TItemListread FList write SetList;56 property List: IList<TItem> read FList write SetList; 57 57 end; 58 58 … … 98 98 if Assigned(ListView1.Selected) then 99 99 with TItem(ListView1.Selected.Data) do begin 100 TempEntry := List.Create Item;100 TempEntry := List.CreateBaseItem; 101 101 TempEntry.Assign(TItem(ListView1.Selected.Data)); 102 102 FormItem := TFormItem.Create(Self); … … 122 122 if (MaxItemCount <> -1) and (List.Count >= MaxItemCount) then Exit; 123 123 124 TempEntry := List.Create Item;124 TempEntry := List.CreateBaseItem; 125 125 FormItem := TFormItem.Create(Self); 126 126 try 127 TempEntry.Name := List.GetNextAvailableName(SNew + ' ' + LowerCase(List.Get ItemClass.GetClassName));127 TempEntry.Name := List.GetNextAvailableName(SNew + ' ' + LowerCase(List.GetName)); 128 128 FormItem.Item := TempEntry; 129 129 if FormItem.ShowModal = mrOk then begin … … 146 146 if (MaxItemCount <> -1) and (List.Count >= MaxItemCount) then Exit; 147 147 148 TempEntry := List.Create Item;148 TempEntry := List.CreateBaseItem; 149 149 TempEntry.Assign(TItem(ListView1.Selected.Data)); 150 150 FormItem := TFormItem.Create(Self); … … 219 219 //Item.Caption := GetName; 220 220 Item.Data := List[Item.Index]; 221 Fields := List.GetItem Class.GetFields;221 Fields := List.GetItemFields; 222 222 try 223 223 for I := 0 to Fields.Count - 1 do begin … … 250 250 end; 251 251 252 procedure TFormList.SetList(AValue: TItemList);252 procedure TFormList.SetList(AValue: IList<TItem>); 253 253 begin 254 254 if FList = AValue then Exit; … … 261 261 Fields: TItemFields; 262 262 begin 263 Fields := List.GetItem Class.GetFields;263 Fields := List.GetItemFields; 264 264 ListView1.Columns.BeginUpdate; 265 265 try -
trunk/Forms/FormNew.pas
r330 r344 388 388 GamePreview.GeneratePlayers := False; 389 389 GamePreview.New; 390 GamePreview.CurrentPlayer := TPlayer(GamePreview.Players.First);390 GamePreview.CurrentPlayer := GamePreview.Players.First; 391 391 Bitmap := Image1.Picture.Bitmap; 392 392 Bitmap.SetSize(Image1.Width, Image1.Height);
Note:
See TracChangeset
for help on using the changeset viewer.