Changeset 5 for trunk/UFormMain.pas


Ignore:
Timestamp:
Sep 24, 2019, 10:09:45 PM (5 years ago)
Author:
chronos
Message:
  • Added: Show game score.
  • Fixed: Make cell font smaller if text is too width.
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:ignore
      •  

        old new  
        11Game2048
        22Game2048.lps
         3Game2048.dbg
        34lib
         5heaptrclog.trc
  • trunk/UFormMain.pas

    r2 r5  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, Menus,
    9   ActnList, UGame;
     9  ActnList, ExtCtrls, StdCtrls, UGame;
    1010
    1111type
     
    1414
    1515  TFormMain = class(TForm)
     16    AExit: TAction;
    1617    AGameNew: TAction;
    1718    ActionList1: TActionList;
    1819    MainMenu1: TMainMenu;
    1920    MenuItem1: TMenuItem;
     21    MenuItem2: TMenuItem;
    2022    MenuItemGame: TMenuItem;
     23    procedure AExitExecute(Sender: TObject);
    2124    procedure AGameNewExecute(Sender: TObject);
    2225    procedure FormCreate(Sender: TObject);
     
    6265end;
    6366
     67procedure TFormMain.FormPaint(Sender: TObject);
     68begin
     69  Game.Render(Canvas);
     70end;
     71
    6472procedure TFormMain.AGameNewExecute(Sender: TObject);
    6573begin
     
    6977    Game.New;
    7078  end;
     79end;
     80
     81procedure TFormMain.AExitExecute(Sender: TObject);
     82begin
     83  Close;
    7184end;
    7285
     
    8295begin
    8396  Game.Free;
    84 end;
    85 
    86 procedure TFormMain.FormPaint(Sender: TObject);
    87 begin
    88   Game.Render(Canvas);
    8997end;
    9098
Note: See TracChangeset for help on using the changeset viewer.