Changeset 318 for trunk/Forms/FormCharts.pas
- Timestamp:
- Jun 21, 2024, 3:20:20 PM (5 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormCharts.pas
r317 r318 5 5 uses 6 6 Classes, SysUtils, FileUtil, TAGraph, TASeries, Forms, Controls, Graphics, 7 Dialogs, StdCtrls, FormEx ;7 Dialogs, StdCtrls, FormEx, Game; 8 8 9 9 type … … 16 16 procedure ComboBox1Change(Sender: TObject); 17 17 procedure FormShow(Sender: TObject); 18 private 19 FGame: TGame; 18 20 public 19 21 procedure Redraw; 20 22 procedure Translate; 23 property Game: TGame read FGame write FGame; 21 24 end; 22 25 … … 27 30 28 31 uses 29 Core, Game,Player;32 Player; 30 33 31 34 resourcestring … … 35 38 SCitiesCount = 'Cities count'; 36 39 SWinObjectiveCells = 'Win objective cells'; 37 38 40 39 41 { TFormCharts } … … 59 61 begin 60 62 Chart1.Series.Clear; 61 for I := 0 to Core.Core.Game.Players.Count - 1 do62 with TPlayer( Core.Core.Game.Players[I]) do begin63 for I := 0 to Game.Players.Count - 1 do 64 with TPlayer(Game.Players[I]) do begin 63 65 NewSeries := TLineSeries.Create(nil); 64 66 NewSeries.LinePen.Color := Color; 65 67 for X := 0 to TurnStats.Count - 1 do begin 66 if ComboBox1.ItemIndex = 0 then NewSeries.AddXY(X, T GameTurnStat(TurnStats[X]).OccupiedCells)67 else if ComboBox1.ItemIndex = 1 then NewSeries.AddXY(X, T GameTurnStat(TurnStats[X]).Units)68 else if ComboBox1.ItemIndex = 2 then NewSeries.AddXY(X, T GameTurnStat(TurnStats[X]).DiscoveredCells)69 else if ComboBox1.ItemIndex = 3 then NewSeries.AddXY(X, T GameTurnStat(TurnStats[X]).Cities)70 else if ComboBox1.ItemIndex = 4 then NewSeries.AddXY(X, T GameTurnStat(TurnStats[X]).WinObjectiveCells);68 if ComboBox1.ItemIndex = 0 then NewSeries.AddXY(X, TurnStats[X].OccupiedCells) 69 else if ComboBox1.ItemIndex = 1 then NewSeries.AddXY(X, TurnStats[X].Units) 70 else if ComboBox1.ItemIndex = 2 then NewSeries.AddXY(X, TurnStats[X].DiscoveredCells) 71 else if ComboBox1.ItemIndex = 3 then NewSeries.AddXY(X, TurnStats[X].Cities) 72 else if ComboBox1.ItemIndex = 4 then NewSeries.AddXY(X, TurnStats[X].WinObjectiveCells); 71 73 end; 72 74 Chart1.AddSeries(NewSeries); … … 78 80 LastIndex: Integer; 79 81 begin 80 Core.Core.Translator1.TranslateComponentRecursive(Self);82 TFormEx.Translator.TranslateComponentRecursive(Self); 81 83 with ComboBox1 do begin 82 84 LastIndex := ItemIndex;
Note:
See TracChangeset
for help on using the changeset viewer.