Changeset 28 for trunk/Forms


Ignore:
Timestamp:
Oct 3, 2011, 8:17:16 PM (13 years ago)
Author:
george
Message:
 
Location:
trunk/Forms
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UMainForm.pas

    r24 r28  
    7272
    7373uses
    74   UMapForm, UNewGameForm;
     74  UMapForm, UNewGameForm, UDebugForm;
     75
     76resourcestring
     77  SRound = '%0:s of %1:s';
    7578
    7679{ TMainForm }
     
    9194      //  IntToStr(TPlayer(Engine.Players[0]).Direction);
    9295      StatusBar1.Panels[2].Text := FloatToStr(RoundTo(DrawDuration / OneMillisecond, -2));
    93       //StatusBar1.Panels[3].Text := IntToStr(TPlayer(Engine.Players[0]).Bullets.Count);
     96      StatusBar1.Panels[3].Text := Format(SRound, [IntToStr(Engine.CurrentRound),
     97        IntToStr(Engine.MaxRound)]);
    9498    finally
    9599      Engine.Lock.Release;
     
    200204  PersistentForm.Load(Self);
    201205  CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('cs');
     206  DebugForm.Show;
    202207end;
    203208
     
    209214procedure TMainForm.Image1Resize(Sender: TObject);
    210215begin
    211   Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height);
    212   Engine.ResizePlayerFrames;
     216  try
     217    Engine.Lock.Acquire;
     218    Image1.Picture.Bitmap.SetSize(Image1.Width, Image1.Height);
     219    Engine.ResizePlayerFrames;
     220  finally
     221    Engine.Lock.Release;
     222  end;
    213223end;
    214224
Note: See TracChangeset for help on using the changeset viewer.