Changeset 106 for trunk/Forms


Ignore:
Timestamp:
Dec 9, 2024, 8:54:41 PM (6 weeks ago)
Author:
chronos
Message:
  • Added: Optionally generated unmergeable movable tiles.
Location:
trunk/Forms
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormNew.lfm

    r105 r106  
    3535    Width = 497
    3636    HorzScrollBar.Page = 435
    37     VertScrollBar.Page = 160
     37    VertScrollBar.Page = 211
    3838    Anchors = [akTop, akLeft, akRight, akBottom]
    3939    ClientHeight = 245
     
    9090      Left = 16
    9191      Height = 26
    92       Top = 122
     92      Top = 128
    9393      Width = 119
    9494      Caption = 'Disabled tiles:'
     
    102102      TabOrder = 3
    103103    end
     104    object Label3: TLabel
     105      Left = 16
     106      Height = 26
     107      Top = 176
     108      Width = 160
     109      Caption = 'Unmergeable tiles:'
     110    end
     111    object SpinEditUnmergeableTiles: TSpinEdit
     112      Left = 320
     113      Height = 43
     114      Top = 168
     115      Width = 115
     116      MaxValue = 10000
     117      TabOrder = 4
     118    end
    104119  end
    105120end
  • trunk/Forms/FormNew.lrj

    r105 r106  
    66{"hash":260260820,"name":"tformnew.checkboxundoenabled.caption","sourcebytes":[85,110,100,111,32,101,110,97,98,108,101,100],"value":"Undo enabled"},
    77{"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":248990730,"name":"tformnew.label2.caption","sourcebytes":[68,105,115,97,98,108,101,100,32,116,105,108,101,115,58],"value":"Disabled tiles:"}
     8{"hash":248990730,"name":"tformnew.label2.caption","sourcebytes":[68,105,115,97,98,108,101,100,32,116,105,108,101,115,58],"value":"Disabled tiles:"},
     9{"hash":266265242,"name":"tformnew.label3.caption","sourcebytes":[85,110,109,101,114,103,101,97,98,108,101,32,116,105,108,101,115,58],"value":"Unmergeable tiles:"}
    910]}
  • trunk/Forms/FormNew.pas

    r105 r106  
    1919    Label1: TLabel;
    2020    Label2: TLabel;
     21    Label3: TLabel;
    2122    ScrollBox1: TScrollBox;
    2223    SpinEditDisabledTiles: TSpinEdit;
     24    SpinEditUnmergeableTiles: TSpinEdit;
    2325    procedure ComboBoxSizeChange(Sender: TObject);
    2426  public
     
    4143
    4244procedure TFormNew.UpdateInterface;
     45var
     46  MaxDisabledTiles: Integer;
    4347begin
    44   SpinEditDisabledTiles.MaxValue := ComboBoxSize.ItemIndex + 2;
     48  MaxDisabledTiles := ComboBoxSize.ItemIndex + 2;
     49  MaxDisabledTiles := MaxDisabledTiles * MaxDisabledTiles - 3;
     50  SpinEditDisabledTiles.MaxValue := MaxDisabledTiles;
     51  SpinEditUnmergeableTiles.MaxValue := MaxDisabledTiles;
    4552end;
    4653
     
    5158  CheckBoxRecordHistory.Checked := Game.RecordHistory;
    5259  SpinEditDisabledTiles.Value := Game.DisabledTilesCount;
     60  SpinEditUnmergeableTiles.Value := Game.UnmergeableTilesCount;
    5361  UpdateInterface;
    5462end;
     
    6068  Game.RecordHistory := CheckBoxRecordHistory.Checked;
    6169  Game.DisabledTilesCount := SpinEditDisabledTiles.Value;
     70  Game.UnmergeableTilesCount := SpinEditUnmergeableTiles.Value;
    6271end;
    6372
Note: See TracChangeset for help on using the changeset viewer.