Changeset 334
- Timestamp:
- Aug 27, 2024, 4:39:09 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ClientGUI.pas
r330 r334 365 365 end; 366 366 if Assigned(SelectedCell) and (SelectedCell = Cell) then 367 367 Brush.Color := clGreen 368 368 else if Assigned(SelectedCell) and ControlPlayer.IsAllowedMoveTarget(SelectedCell, Cell) then 369 369 Brush.Color := clPurple -
trunk/ItemList.pas
r326 r334 4 4 5 5 uses 6 Classes, SysUtils, Generics.Collections, DOM, XML, Common, Graphics ;6 Classes, SysUtils, Generics.Collections, DOM, XML, Common, Graphics, Math; 7 7 8 8 type … … 77 77 78 78 TItemList = class(TObjectList<TItem>) 79 private 80 procedure RecalculateNewId(Reset: Boolean); 81 public 79 82 NewId: Integer; 80 83 class function GetItemClass: TItemClass; virtual; … … 144 147 for I := 0 to Count - 1 do 145 148 TItem(Items[I]).Assign(Source.Items[I]); 149 RecalculateNewId(True); 146 150 end; 147 151 … … 172 176 Node2 := Node2.NextSibling; 173 177 end; 178 RecalculateNewId(True); 174 179 end; 175 180 … … 191 196 inherited; 192 197 NewId := 1; 198 end; 199 200 procedure TItemList.RecalculateNewId(Reset: Boolean); 201 var 202 I: Integer; 203 begin 204 NewId := 1; 205 for I := 0 to Count - 1 do 206 with TItem(Items[I]) do begin 207 NewId := Max(NewId, Id + 1); 208 end; 193 209 end; 194 210
Note:
See TracChangeset
for help on using the changeset viewer.