Changeset 28 for trunk/Forms


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.
Location:
trunk/Forms
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r20 r28  
    44  Top = 307
    55  Width = 580
    6   Caption = '2048 game'
     6  Caption = '2048'
    77  DesignTimePPI = 144
    88  Menu = MainMenu1
     
    3434    object MenuItemHelp: TMenuItem
    3535      Caption = 'Help'
     36      object MenuItem3: TMenuItem
     37        Action = Core.AHelp
     38      end
    3639      object MenuItemAbout: TMenuItem
    3740        Action = Core.AAbout
  • trunk/Forms/UFormMain.lrj

    r11 r28  
    11{"version":1,"strings":[
    2 {"hash":128377605,"name":"tformmain.caption","sourcebytes":[50,48,52,56,32,103,97,109,101],"value":"2048 game"},
     2{"hash":217976,"name":"tformmain.caption","sourcebytes":[50,48,52,56],"value":"2048"},
    33{"hash":317493,"name":"tformmain.menuitemgame.caption","sourcebytes":[71,97,109,101],"value":"Game"},
    44{"hash":322608,"name":"tformmain.menuitemhelp.caption","sourcebytes":[72,101,108,112],"value":"Help"}
  • trunk/Forms/UFormMain.pas

    r20 r28  
    1717    MenuItem1: TMenuItem;
    1818    MenuItem2: TMenuItem;
     19    MenuItem3: TMenuItem;
    1920    MenuItemNew: TMenuItem;
    2021    MenuItemExit: TMenuItem;
  • trunk/Forms/UFormNew.lfm

    r20 r28  
    11object FormNew: TFormNew
    2   Left = 753
     2  Left = 703
    33  Height = 212
    4   Top = 825
     4  Top = 748
    55  Width = 487
    66  Caption = 'New game'
     
    6060    TabOrder = 2
    6161  end
     62  object CheckBoxUndoEnabled: TCheckBox
     63    Left = 16
     64    Height = 30
     65    Top = 56
     66    Width = 145
     67    Caption = 'Undo enabled'
     68    TabOrder = 3
     69  end
    6270end
  • trunk/Forms/UFormNew.lrj

    r8 r28  
    33{"hash":103901194,"name":"tformnew.label1.caption","sourcebytes":[66,111,97,114,100,32,115,105,122,101,58],"value":"Board size:"},
    44{"hash":77089212,"name":"tformnew.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
    5 {"hash":1339,"name":"tformnew.buttonok.caption","sourcebytes":[79,75],"value":"OK"}
     5{"hash":1339,"name":"tformnew.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
     6{"hash":260260820,"name":"tformnew.checkboxundoenabled.caption","sourcebytes":[85,110,100,111,32,101,110,97,98,108,101,100],"value":"Undo enabled"}
    67]}
  • trunk/Forms/UFormNew.pas

    r20 r28  
    1616    ButtonCancel: TButton;
    1717    ButtonOk: TButton;
     18    CheckBoxUndoEnabled: TCheckBox;
    1819    ComboBoxSize: TComboBox;
    1920    Label1: TLabel;
     
    4647begin
    4748  ComboBoxSize.ItemIndex := Game.Board.Size.X - 2;
     49  CheckBoxUndoEnabled.Checked := Game.UndoEnabled;
    4850end;
    4951
     
    5153begin
    5254  Game.Board.Size := Point(2 + ComboBoxSize.ItemIndex, 2 + ComboBoxSize.ItemIndex);
     55  Game.UndoEnabled := CheckBoxUndoEnabled.Checked;
    5356end;
    5457
Note: See TracChangeset for help on using the changeset viewer.