Changeset 36 for trunk/Forms


Ignore:
Timestamp:
Oct 13, 2019, 5:14:50 PM (5 years ago)
Author:
chronos
Message:
  • Fixed: Missing UFormHistory files.
  • Added: Allow to disable moves history recording.
Location:
trunk/Forms
Files:
3 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.lfm

    r31 r36  
    3737        Action = Core.AComputer
    3838      end
    39       object MenuItem5: TMenuItem
     39      object MenuItemMovesHistory: TMenuItem
    4040        Action = Core.AHistory
    4141      end
  • trunk/Forms/UFormMain.pas

    r35 r36  
    1919    MenuItem3: TMenuItem;
    2020    MenuItem4: TMenuItem;
    21     MenuItem5: TMenuItem;
     21    MenuItemMovesHistory: TMenuItem;
    2222    MenuItemTools: TMenuItem;
    2323    MenuItemNew: TMenuItem;
     
    8888  Core.PersistentForm1.Load(Self);
    8989  UpdateInterface;
     90  if Core.Game.Board.GetEmptyTilesCount > Core.Game.Board.Size.X * Core.Game.Board.Size.Y - 2 then
     91    Core.Game.New;
    9092end;
    9193
     
    108110  ToolsVisible: Boolean;
    109111begin
     112  MenuItemMovesHistory.Visible := Core.Game.RecordHistory;
    110113  ToolsVisible := False;
    111114  for I := 0 to MenuItemTools.Count - 1 do
  • trunk/Forms/UFormNew.lfm

    r31 r36  
    11object FormNew: TFormNew
    22  Left = 703
    3   Height = 212
    4   Top = 748
    5   Width = 487
     3  Height = 266
     4  Top = 694
     5  Width = 501
    66  Caption = 'New game'
    7   ClientHeight = 212
    8   ClientWidth = 487
     7  ClientHeight = 266
     8  ClientWidth = 501
    99  DesignTimePPI = 144
    1010  OnClose = FormClose
     
    4545    Left = 120
    4646    Height = 38
    47     Top = 158
     47    Top = 212
    4848    Width = 113
    4949    Anchors = [akLeft, akBottom]
     
    5555    Left = 280
    5656    Height = 38
    57     Top = 158
     57    Top = 212
    5858    Width = 113
    5959    Anchors = [akLeft, akBottom]
     
    7070    TabOrder = 3
    7171  end
     72  object CheckBoxRecordHistory: TCheckBox
     73    Left = 16
     74    Height = 30
     75    Top = 88
     76    Width = 210
     77    Caption = 'Record moves history'
     78    TabOrder = 4
     79  end
    7280end
  • trunk/Forms/UFormNew.lrj

    r28 r36  
    44{"hash":77089212,"name":"tformnew.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
    55{"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"}
     6{"hash":260260820,"name":"tformnew.checkboxundoenabled.caption","sourcebytes":[85,110,100,111,32,101,110,97,98,108,101,100],"value":"Undo enabled"},
     7{"hash":146862089,"name":"tformnew.checkboxrecordhistory.caption","sourcebytes":[82,101,99,111,114,100,32,109,111,118,101,115,32,104,105,115,116,111,114,121],"value":"Record moves history"}
    78]}
  • trunk/Forms/UFormNew.pas

    r31 r36  
    1616    ButtonCancel: TButton;
    1717    ButtonOk: TButton;
     18    CheckBoxRecordHistory: TCheckBox;
    1819    CheckBoxUndoEnabled: TCheckBox;
    1920    ComboBoxSize: TComboBox;
     
    6061  ComboBoxSize.ItemIndex := Game.Board.Size.X - 2;
    6162  CheckBoxUndoEnabled.Checked := Game.UndoEnabled;
     63  CheckBoxRecordHistory.Checked := Game.RecordHistory;
    6264end;
    6365
     
    6668  Game.Board.Size := Point(2 + ComboBoxSize.ItemIndex, 2 + ComboBoxSize.ItemIndex);
    6769  Game.UndoEnabled := CheckBoxUndoEnabled.Checked;
     70  Game.RecordHistory := CheckBoxRecordHistory.Checked;
    6871end;
    6972
  • trunk/Forms/UFormSettings.pas

    r15 r36  
    6262    Core.Translator1.Language := TLanguage(ComboBoxLanguage.Items.Objects[ComboBoxLanguage.ItemIndex]);
    6363  end;
    64   Close;
     64  ModalResult := mrOk;
    6565end;
    6666
Note: See TracChangeset for help on using the changeset viewer.