Changeset 182 for trunk/Forms
- Timestamp:
- Feb 9, 2018, 10:06:13 AM (7 years ago)
- Location:
- trunk/Forms
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormPlayersStats.lfm
r181 r182 3 3 Height = 300 4 4 Top = 237 5 Width = 5965 Width = 697 6 6 Caption = 'Players stats' 7 7 ClientHeight = 300 8 ClientWidth = 5968 ClientWidth = 697 9 9 DesignTimePPI = 120 10 10 OnClose = FormClose … … 15 15 Height = 292 16 16 Top = 4 17 Width = 58817 Width = 689 18 18 Align = alClient 19 19 BorderSpacing.Around = 4 … … 21 21 item 22 22 Caption = 'Name' 23 Width = 100 24 end 25 item 26 Caption = 'Mode' 23 27 Width = 100 24 28 end … … 40 44 end> 41 45 OwnerData = True 46 PopupMenu = PopupMenu1 42 47 ReadOnly = True 43 48 RowSelect = True … … 46 51 OnData = ListView1Data 47 52 end 53 object PopupMenu1: TPopupMenu 54 left = 143 55 top = 110 56 object MenuItem1: TMenuItem 57 Action = ASpectate 58 end 59 end 60 object ActionList1: TActionList 61 left = 358 62 top = 111 63 object ASpectate: TAction 64 Caption = 'Spectate' 65 OnExecute = ASpectateExecute 66 end 67 end 48 68 end -
trunk/Forms/UFormPlayersStats.pas
r181 r182 7 7 uses 8 8 Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ComCtrls, 9 UGame;9 Menus, ActnList, UGame; 10 10 11 11 type … … 14 14 15 15 TFormPlayersStats = class(TForm) 16 ASpectate: TAction; 17 ActionList1: TActionList; 16 18 ListView1: TListView; 19 MenuItem1: TMenuItem; 20 PopupMenu1: TPopupMenu; 21 procedure ASpectateExecute(Sender: TObject); 17 22 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); 18 23 procedure FormShow(Sender: TObject); … … 43 48 with TPlayer(Players[Item.Index]) do begin 44 49 Item.Caption := Name; 50 Item.Data := Players[Item.Index]; 51 Item.SubItems.Add(PlayerModeText[Mode]); 45 52 Item.SubItems.Add(IntToStr(TotalCells)); 46 53 Item.SubItems.Add(IntToStr(TotalDiscovered)); … … 63 70 end; 64 71 72 procedure TFormPlayersStats.ASpectateExecute(Sender: TObject); 73 begin 74 if Assigned(ListView1.Selected) then 75 Core.Spectate(TPlayer(ListView1.Selected.Data)); 76 end; 77 65 78 procedure TFormPlayersStats.ReloadList; 66 79 begin
Note:
See TracChangeset
for help on using the changeset viewer.