Changeset 284 for trunk/Forms
- Timestamp:
- Mar 10, 2019, 6:19:51 PM (6 years ago)
- Location:
- trunk/Forms
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormGameSystem.pas
r283 r284 138 138 FormUnitKinds.UpdateList; 139 139 FormUnitKinds.UpdateInterface; 140 Caption := ExtractFileName(Self.GameSystem.FileName) + ' - ' + SGameSystem; 140 141 end; 141 142 -
trunk/Forms/UFormNation.pas
r283 r284 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, 9 Spin,ColorBox, UNation;9 ColorBox, UNation; 10 10 11 11 type … … 30 30 FormNation: TFormNation; 31 31 32 32 33 implementation 33 34 … … 40 41 EditName.Text := Nation.Name; 41 42 ColorBoxColor.Selected := Nation.Color; 43 Caption := Nation.Name + ' - ' + SNation; 42 44 end; 43 45 -
trunk/Forms/UFormNations.lfm
r283 r284 95 95 Caption = 'Clone' 96 96 ImageIndex = 17 97 OnExecute = ACloneExecute 97 98 end 98 99 object ASelectAll: TAction -
trunk/Forms/UFormNations.pas
r283 r284 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ActnList, Menus, U GameSystem, UNation;9 ActnList, Menus, UNation; 10 10 11 11 type … … 33 33 ToolButton4: TToolButton; 34 34 procedure AAddExecute(Sender: TObject); 35 procedure ACloneExecute(Sender: TObject); 35 36 procedure AModifyExecute(Sender: TObject); 36 37 procedure ARemoveExecute(Sender: TObject); … … 137 138 end; 138 139 140 procedure TFormNations.ACloneExecute(Sender: TObject); 141 var 142 TempEntry: TNation; 143 begin 144 if Assigned(ListView1.Selected) then 145 with TNation(ListView1.Selected.Data) do begin 146 TempEntry := TNation.Create; 147 TempEntry.Assign(TNation(ListView1.Selected.Data)); 148 FormNation := TFormNation.Create(Self); 149 try 150 TempEntry.Name := Nations.GetNextAvailableName(TempEntry.Name); 151 FormNation.Load(TempEntry); 152 if FormNation.ShowModal = mrOk then begin 153 FormNation.Save(TempEntry); 154 Nations.Add(TempEntry); 155 TempEntry := nil; 156 UpdateList; 157 UpdateInterface; 158 end; 159 finally 160 FreeAndNil(FormNation); 161 end; 162 TempEntry.Free; 163 end; 164 end; 165 139 166 procedure TFormNations.ASelectAllExecute(Sender: TObject); 140 167 var -
trunk/Forms/UFormPlayers.pas
r282 r284 69 69 70 70 uses 71 UCore, UFormPlayer, UGame ;71 UCore, UFormPlayer, UGame, UNation; 72 72 73 73 resourcestring … … 131 131 TempEntry.Id := Players.GetNewId; 132 132 TempEntry.Name := SPlayer + ' ' + IntToStr(TempEntry.Id); 133 TempEntry.Nation := Core.Game.GameSystem.Nations.First;133 TempEntry.Nation := TNation(Core.Game.GameSystem.Nations.First); 134 134 TempEntry.Color := TempEntry.Nation.Color; 135 135 TempEntry.Mode := pmComputer; 136 136 TempEntry.Agressivity := caMedium; 137 TempEntry.Game := Players.Game; 137 138 FormPlayer.LoadData(TempEntry); 138 139 if FormPlayer.ShowModal = mrOk then begin -
trunk/Forms/UFormUnitKinds.pas
r277 r284 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 ActnList, Menus, U GameSystem, UUnit;9 ActnList, Menus, UUnit; 10 10 11 11 type
Note:
See TracChangeset
for help on using the changeset viewer.