Changeset 318 for trunk/Forms/FormPlayersStats.pas
- Timestamp:
- Jun 21, 2024, 3:20:20 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormPlayersStats.pas
r317 r318 5 5 uses 6 6 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 7 Menus, ActnList, Game, ListViewSort, FormEx ;7 Menus, ActnList, Game, ListViewSort, FormEx, Player; 8 8 9 9 type … … 23 23 function ListViewSort1CompareItem(Item1, Item2: TObject): Integer; 24 24 procedure ListViewSort1Filter(ListViewSort: TListViewSort); 25 private 26 FOnSpectate: TPlayerEvent; 25 27 public 28 Game: TGame; 26 29 procedure ReloadList; 30 property OnSpectate: TPlayerEvent read FOnSpectate write FOnSpectate; 27 31 end; 28 32 29 33 30 34 implementation 31 32 uses33 Core, Player;34 35 35 36 {$R *.lfm} … … 39 40 procedure TFormPlayersStats.ListView1Data(Sender: TObject; Item: TListItem); 40 41 begin 41 with Core.Core.Game do42 with Game do 42 43 if Item.Index < ListViewSort1.List.Count then 43 44 with TPlayer(ListViewSort1.List[Item.Index]) do begin … … 77 78 begin 78 79 ListViewSort1.List.Clear; 79 for I := 0 to Core.Core.Game.Players.Count - 1 do begin80 ListViewSort1.List.Add( Core.Core.Game.Players[I]);80 for I := 0 to Game.Players.Count - 1 do begin 81 ListViewSort1.List.Add(Game.Players[I]); 81 82 end; 82 83 end; … … 90 91 begin 91 92 if Assigned(ListView1.Selected) then 92 Core.Core.Spectate(TPlayer(ListView1.Selected.Data)); 93 if Assigned(FOnSpectate) then 94 FOnSpectate(TPlayer(ListView1.Selected.Data)); 93 95 end; 94 96
Note:
See TracChangeset
for help on using the changeset viewer.