Changeset 74 for trunk/Forms/UFormNew.pas
- Timestamp:
- Oct 4, 2014, 9:19:27 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormNew.pas
r70 r74 56 56 procedure FormDestroy(Sender: TObject); 57 57 procedure FormShow(Sender: TObject); 58 procedure ListView1CustomDrawSubItem(Sender: TCustomListView; 59 Item: TListItem; SubItem: Integer; State: TCustomDrawState; 60 var DefaultDraw: Boolean); 58 61 procedure ListView1Data(Sender: TObject; Item: TListItem); 59 62 procedure ListView1DblClick(Sender: TObject); … … 111 114 Item.Data := Players[Item.Index]; 112 115 Item.SubItems.Add(PlayerModeText[Mode]); 113 Item.SubItems.Add( IntToStr(Color));116 Item.SubItems.Add(''); // Do not show color text 114 117 Item.SubItems.Add(IntToStr(StartUnits)); 115 118 end; … … 212 215 begin 213 216 ReloadView; 217 end; 218 219 procedure TFormNew.ListView1CustomDrawSubItem(Sender: TCustomListView; 220 Item: TListItem; SubItem: Integer; State: TCustomDrawState; 221 var DefaultDraw: Boolean); 222 begin 223 if SubItem = 2 then 224 with ListView1.Canvas do begin 225 Brush.Color := TPlayer(Item.Data).Color; 226 Brush.Style := bsSolid; 227 FillRect(Item.DisplayRectSubItem(2, drBounds)); 228 end; 214 229 end; 215 230
Note:
See TracChangeset
for help on using the changeset viewer.