Changeset 86 for trunk/Forms/FormHistory.pas
- Timestamp:
- Jun 7, 2024, 12:47:11 PM (5 months ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormHistory.pas
r85 r86 1 unit UFormHistory; 2 3 {$mode delphi} 1 unit FormHistory; 4 2 5 3 interface 6 4 7 5 uses 8 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls, UGame; 6 Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ExtCtrls, ComCtrls, 7 Game, FormEx; 9 8 10 9 type … … 12 11 { TFormHistory } 13 12 14 TFormHistory = class(TForm )13 TFormHistory = class(TFormEx) 15 14 PaintBox1: TPaintBox; 16 15 Panel1: TPanel; 17 16 Timer1: TTimer; 18 17 TrackBar1: TTrackBar; 19 procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);20 18 procedure FormCreate(Sender: TObject); 21 19 procedure FormDestroy(Sender: TObject); … … 31 29 end; 32 30 33 var34 FormHistory: TFormHistory;35 31 36 32 implementation … … 39 35 40 36 uses 41 UCore;37 Core; 42 38 43 39 { TFormHistory } … … 45 41 procedure TFormHistory.FormShow(Sender: TObject); 46 42 begin 47 Core.PersistentForm1.Load(Self); 48 TrackBar1.Max := Core.Game.History.Moves.Count; 49 Game.Board.Size := Core.Game.Board.Size; 43 TrackBar1.Max := Core.Core.Game.History.Moves.Count; 44 Game.Board.Size := Core.Core.Game.Board.Size; 50 45 Redraw; 51 46 end; … … 59 54 begin 60 55 if RedrawPending then begin 61 Core. Game.History.GetStep(Game, TrackBar1.Position);56 Core.Core.Game.History.GetStep(Game, TrackBar1.Position); 62 57 PaintBox1.Refresh; 63 58 RedrawPending := False; … … 77 72 procedure TFormHistory.FormCreate(Sender: TObject); 78 73 begin 79 Core.Translator1.TranslateComponentRecursive(Self);80 Core.ThemeManager1.UseTheme(Self);81 74 Game := TGame.Create; 82 75 end; … … 87 80 end; 88 81 89 procedure TFormHistory.FormClose(Sender: TObject; var CloseAction: TCloseAction90 );91 begin92 Core.PersistentForm1.Save(Self);93 end;94 95 82 end. 96 83
Note:
See TracChangeset
for help on using the changeset viewer.