Changeset 53 for trunk/Forms


Ignore:
Timestamp:
Jan 4, 2022, 3:27:03 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Update Common package.
Location:
trunk/Forms
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r52 r53  
    55  Width = 770
    66  Caption = 'Tunneler'
    7   ClientHeight = 588
     7  ClientHeight = 584
    88  ClientWidth = 770
    99  DesignTimePPI = 144
     
    1919  object StatusBar1: TStatusBar
    2020    Left = 0
    21     Height = 36
    22     Top = 552
     21    Height = 27
     22    Top = 557
    2323    Width = 770
    2424    Panels = <   
     
    4949  object Image1: TImage
    5050    Left = 0
    51     Height = 552
     51    Height = 557
    5252    Top = 0
    5353    Width = 770
     
    135135  end
    136136  object AboutDialog1: TAboutDialog
    137     CoolTranslator = Core.Translator1
     137    Translator = Core.Translator1
    138138    ThemeManager = Core.ThemeManager1
    139139    ApplicationInfo = Core.ApplicationInfo
  • trunk/Forms/UFormMain.pas

    r52 r53  
    5555    procedure TimerEngineTickTimer(Sender: TObject);
    5656  private
    57     OriginalBounds: TRect;
    58     OriginalWindowState: TWindowState;
    59     ScreenBounds: TRect;
    6057    StartTime: TDateTime;
    6158    Drawing: Boolean;
     
    9289    StartTime := NowPrecise;
    9390    //Engine.Draw;
    94     Engine.Lock.Acquire;
    95     try
    96       //StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
    97       //  IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
    98       //  IntToStr(TPlayer(Engine.Players[0]).Direction);
    99       StatusBar1.Panels[2].Text := FloatToStr(RoundTo(Engine.DrawDuration / OneMillisecond, -2));
    100       StatusBar1.Panels[3].Text := Format(SRound, [IntToStr(Engine.CurrentRound),
    101         IntToStr(Engine.MaxRound)]);
    102     finally
    103       Engine.Lock.Release;
     91    if Assigned(Engine) then begin
     92      Engine.Lock.Acquire;
     93      try
     94        //StatusBar1.Panels[1].Text := IntToStr(TPlayer(Engine.Players[0]).Position.X) + ', ' +
     95        //  IntToStr(TPlayer(Engine.Players[0]).Position.Y) + ' ' +
     96        //  IntToStr(TPlayer(Engine.Players[0]).Direction);
     97        StatusBar1.Panels[2].Text := FloatToStr(RoundTo(Engine.DrawDuration / OneMillisecond, -2));
     98        StatusBar1.Panels[3].Text := Format(SRound, [IntToStr(Engine.CurrentRound),
     99          IntToStr(Engine.MaxRound)]);
     100      finally
     101        Engine.Lock.Release;
     102      end;
    104103    end;
    105104  finally
Note: See TracChangeset for help on using the changeset viewer.