Ignore:
Timestamp:
Oct 4, 2019, 11:57:05 PM (5 years ago)
Author:
chronos
Message:
  • Added: Configurable speed of animations.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSettings.pas

    r8 r11  
    66
    77uses
    8   Classes, SysUtils, Forms, Controls, Graphics, Dialogs;
     8  Classes, SysUtils, Forms, Controls, Graphics, Dialogs, StdCtrls, ComCtrls;
    99
    1010type
     11
     12  { TFormSettings }
     13
    1114  TFormSettings = class(TForm)
     15    ButtonOk: TButton;
     16    ButtonCancel: TButton;
     17    Label1: TLabel;
     18    TrackBar1: TTrackBar;
     19    procedure ButtonCancelClick(Sender: TObject);
     20    procedure ButtonOkClick(Sender: TObject);
     21    procedure FormShow(Sender: TObject);
    1222  private
    1323
     
    2333{$R *.lfm}
    2434
     35uses
     36  UCore;
     37
     38{ TFormSettings }
     39
     40procedure TFormSettings.ButtonCancelClick(Sender: TObject);
     41begin
     42  Close;
     43end;
     44
     45procedure TFormSettings.ButtonOkClick(Sender: TObject);
     46begin
     47  Core.Game.AnimationDuration := TrackBar1.Position;
     48  Close;
     49end;
     50
     51procedure TFormSettings.FormShow(Sender: TObject);
     52begin
     53  TrackBar1.Position := Core.Game.AnimationDuration;
     54end;
     55
    2556end.
    2657
Note: See TracChangeset for help on using the changeset viewer.