Changeset 28 for trunk/UCore.pas


Ignore:
Timestamp:
Oct 5, 2019, 11:29:11 PM (5 years ago)
Author:
chronos
Message:
  • Added: Help windows with instructions how to play.
  • Added: With 10% chance create new random tile with value 4 instead of 2.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/UCore.pas

    r21 r28  
    1515  TCore = class(TDataModule)
    1616    AAbout: TAction;
     17    AHelp: TAction;
    1718    AUndo: TAction;
    1819    ASettings: TAction;
     
    2627    procedure AAboutExecute(Sender: TObject);
    2728    procedure AExitExecute(Sender: TObject);
     29    procedure AHelpExecute(Sender: TObject);
    2830    procedure ANewExecute(Sender: TObject);
    2931    procedure ASettingsExecute(Sender: TObject);
     
    4850
    4951uses
    50   UFormMain, UFormSettings, UFormAbout, UFormNew;
     52  UFormMain, UFormSettings, UFormAbout, UFormNew, UFormHelp;
    5153
    5254{ TCore }
     
    98100end;
    99101
     102procedure TCore.AHelpExecute(Sender: TObject);
     103begin
     104  FormHelp := TFormHelp.Create(nil);
     105  try
     106    FormHelp.ShowModal;
     107  finally
     108    FreeAndNil(FormHelp);
     109  end;
     110end;
     111
    100112procedure TCore.ANewExecute(Sender: TObject);
    101113begin
     
    126138procedure TCore.UpdateInterface;
    127139begin
    128   AUndo.Enabled := Game.CanUndo;;
     140  AUndo.Enabled := Game.CanUndo;
    129141end;
    130142
Note: See TracChangeset for help on using the changeset viewer.