Changeset 49 for trunk/Forms


Ignore:
Timestamp:
Nov 3, 2019, 11:45:03 AM (5 years ago)
Author:
chronos
Message:
  • Added: Support for selectable skins of tiles. Tile values are now representing normal sequence of numbers. If power of two is selected, values are recalculated for rendering and score.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormNew.lfm

    r36 r49  
    7878    TabOrder = 4
    7979  end
     80  object Label2: TLabel
     81    Left = 16
     82    Height = 26
     83    Top = 125
     84    Width = 75
     85    Caption = 'Tile skin:'
     86    ParentColor = False
     87  end
     88  object ComboBoxSkin: TComboBox
     89    Left = 173
     90    Height = 38
     91    Top = 120
     92    Width = 262
     93    ItemHeight = 0
     94    Items.Strings = (
     95      ''
     96    )
     97    Style = csDropDownList
     98    TabOrder = 5
     99  end
    80100end
  • trunk/Forms/UFormNew.lrj

    r36 r49  
    55{"hash":1339,"name":"tformnew.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
    66{"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"}
     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"},
     8{"hash":125677626,"name":"tformnew.label2.caption","sourcebytes":[84,105,108,101,32,115,107,105,110,58],"value":"Tile skin:"}
    89]}
  • trunk/Forms/UFormNew.pas

    r36 r49  
    1919    CheckBoxUndoEnabled: TCheckBox;
    2020    ComboBoxSize: TComboBox;
     21    ComboBoxSkin: TComboBox;
    2122    Label1: TLabel;
     23    Label2: TLabel;
    2224    procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
    2325    procedure FormCreate(Sender: TObject);
     
    4345
    4446procedure TFormNew.FormCreate(Sender: TObject);
     47var
     48  I: TTileSkin;
    4549begin
    4650  Core.Translator1.TranslateComponentRecursive(Self);
     51  ComboBoxSkin.Items.Clear;
     52  for I := Low(SkinText) to High(SkinText) do
     53    ComboBoxSkin.Items.Add(SkinText[I]);
    4754end;
    4855
     
    6269  CheckBoxUndoEnabled.Checked := Game.UndoEnabled;
    6370  CheckBoxRecordHistory.Checked := Game.RecordHistory;
     71  ComboBoxSkin.ItemIndex := Integer(Game.Skin);
    6472end;
    6573
     
    6977  Game.UndoEnabled := CheckBoxUndoEnabled.Checked;
    7078  Game.RecordHistory := CheckBoxRecordHistory.Checked;
     79  Game.Skin := TTileSkin(ComboBoxSkin.ItemIndex);
    7180end;
    7281
Note: See TracChangeset for help on using the changeset viewer.