Changeset 89 for trunk/Forms


Ignore:
Timestamp:
Jun 7, 2024, 4:35:46 PM (5 months ago)
Author:
chronos
Message:
  • Added: Allow to select color palette in new game dialog.
  • Fixed: Use scrollboxes in options dialogs.
Location:
trunk/Forms
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormNew.lfm

    r86 r89  
    11object FormNew: TFormNew
    2   Left = 703
    3   Height = 266
    4   Top = 694
    5   Width = 501
     2  Left = 1029
     3  Height = 322
     4  Top = 587
     5  Width = 514
    66  Caption = 'New game'
    7   ClientHeight = 266
    8   ClientWidth = 501
     7  ClientHeight = 322
     8  ClientWidth = 514
    99  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  LCLVersion = '3.4.0.0'
    12   object Label1: TLabel
    13     Left = 16
    14     Height = 26
    15     Top = 16
    16     Width = 93
    17     Caption = 'Board size:'
    18     ParentColor = False
    19   end
    20   object ComboBoxSize: TComboBox
    21     Left = 173
     12  object ButtonCancel: TButton
     13    Left = 255
    2214    Height = 38
    23     Top = 11
    24     Width = 262
    25     ItemHeight = 0
    26     Items.Strings = (
    27       '2 x 2'
    28       '3 x 3'
    29       '4 x 4'
    30       '5 x 5'
    31       '6 x 6'
    32       '7 x 7'
    33       '8 x 8'
    34       '9 x 9'
    35       '10 x 10 '
    36       '11 x 11'
    37       '12 x 12'
    38     )
    39     Style = csDropDownList
     15    Top = 271
     16    Width = 116
     17    Anchors = [akRight, akBottom]
     18    Caption = 'Cancel'
     19    ModalResult = 2
    4020    TabOrder = 0
    4121  end
    42   object ButtonCancel: TButton
    43     Left = 120
     22  object ButtonOk: TButton
     23    Left = 391
    4424    Height = 38
    45     Top = 212
    46     Width = 113
    47     Anchors = [akLeft, akBottom]
    48     Caption = 'Cancel'
    49     ModalResult = 2
     25    Top = 271
     26    Width = 116
     27    Anchors = [akRight, akBottom]
     28    Caption = 'OK'
     29    ModalResult = 1
    5030    TabOrder = 1
    5131  end
    52   object ButtonOk: TButton
    53     Left = 280
    54     Height = 38
    55     Top = 212
    56     Width = 113
    57     Anchors = [akLeft, akBottom]
    58     Caption = 'OK'
    59     ModalResult = 1
     32  object ScrollBox1: TScrollBox
     33    Left = 8
     34    Height = 247
     35    Top = 8
     36    Width = 497
     37    HorzScrollBar.Page = 435
     38    VertScrollBar.Page = 214
     39    Anchors = [akTop, akLeft, akRight, akBottom]
     40    ClientHeight = 245
     41    ClientWidth = 495
    6042    TabOrder = 2
    61   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
    70   object CheckBoxRecordHistory: TCheckBox
    71     Left = 16
    72     Height = 30
    73     Top = 88
    74     Width = 209
    75     Caption = 'Record moves history'
    76     TabOrder = 4
    77   end
    78   object Label2: TLabel
    79     Left = 16
    80     Height = 26
    81     Top = 125
    82     Width = 75
    83     Caption = 'Tile skin:'
    84     ParentColor = False
    85   end
    86   object ComboBoxSkin: TComboBox
    87     Left = 173
    88     Height = 38
    89     Top = 120
    90     Width = 262
    91     ItemHeight = 0
    92     Items.Strings = (
    93       ''
    94     )
    95     Style = csDropDownList
    96     TabOrder = 5
     43    object Label1: TLabel
     44      Left = 16
     45      Height = 26
     46      Top = 16
     47      Width = 93
     48      Caption = 'Board size:'
     49      ParentColor = False
     50    end
     51    object ComboBoxSize: TComboBox
     52      Left = 173
     53      Height = 38
     54      Top = 11
     55      Width = 262
     56      ItemHeight = 0
     57      Items.Strings = (
     58        '2 x 2'
     59        '3 x 3'
     60        '4 x 4'
     61        '5 x 5'
     62        '6 x 6'
     63        '7 x 7'
     64        '8 x 8'
     65        '9 x 9'
     66        '10 x 10 '
     67        '11 x 11'
     68        '12 x 12'
     69      )
     70      Style = csDropDownList
     71      TabOrder = 0
     72    end
     73    object CheckBoxUndoEnabled: TCheckBox
     74      Left = 16
     75      Height = 30
     76      Top = 56
     77      Width = 145
     78      Caption = 'Undo enabled'
     79      TabOrder = 1
     80    end
     81    object CheckBoxRecordHistory: TCheckBox
     82      Left = 16
     83      Height = 30
     84      Top = 88
     85      Width = 209
     86      Caption = 'Record moves history'
     87      TabOrder = 2
     88    end
     89    object Label2: TLabel
     90      Left = 16
     91      Height = 26
     92      Top = 133
     93      Width = 75
     94      Caption = 'Tile skin:'
     95      ParentColor = False
     96    end
     97    object ComboBoxSkin: TComboBox
     98      Left = 173
     99      Height = 38
     100      Top = 128
     101      Width = 262
     102      ItemHeight = 0
     103      Items.Strings = (
     104        ''
     105      )
     106      Style = csDropDownList
     107      TabOrder = 3
     108    end
     109    object Label3: TLabel
     110      Left = 16
     111      Height = 26
     112      Top = 181
     113      Width = 113
     114      Caption = 'Color palette:'
     115      ParentColor = False
     116    end
     117    object ComboBoxColorPalette: TComboBox
     118      Left = 173
     119      Height = 38
     120      Top = 176
     121      Width = 262
     122      ItemHeight = 0
     123      Items.Strings = (
     124        'RGB'
     125        'RBG'
     126        'GRB'
     127        'GBR'
     128        'BGR'
     129        'BRG'
     130      )
     131      Style = csDropDownList
     132      TabOrder = 4
     133    end
    97134  end
    98135end
  • trunk/Forms/FormNew.lrj

    r86 r89  
    11{"version":1,"strings":[
    22{"hash":211211125,"name":"tformnew.caption","sourcebytes":[78,101,119,32,103,97,109,101],"value":"New game"},
    3 {"hash":103901194,"name":"tformnew.label1.caption","sourcebytes":[66,111,97,114,100,32,115,105,122,101,58],"value":"Board size:"},
    43{"hash":77089212,"name":"tformnew.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
    54{"hash":1339,"name":"tformnew.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
     5{"hash":103901194,"name":"tformnew.label1.caption","sourcebytes":[66,111,97,114,100,32,115,105,122,101,58],"value":"Board size:"},
    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":125677626,"name":"tformnew.label2.caption","sourcebytes":[84,105,108,101,32,115,107,105,110,58],"value":"Tile skin:"}
     8{"hash":125677626,"name":"tformnew.label2.caption","sourcebytes":[84,105,108,101,32,115,107,105,110,58],"value":"Tile skin:"},
     9{"hash":35322186,"name":"tformnew.label3.caption","sourcebytes":[67,111,108,111,114,32,112,97,108,101,116,116,101,58],"value":"Color palette:"}
    910]}
  • trunk/Forms/FormNew.pas

    r86 r89  
    1616    CheckBoxRecordHistory: TCheckBox;
    1717    CheckBoxUndoEnabled: TCheckBox;
     18    ComboBoxColorPalette: TComboBox;
    1819    ComboBoxSize: TComboBox;
    1920    ComboBoxSkin: TComboBox;
    2021    Label1: TLabel;
    2122    Label2: TLabel;
     23    Label3: TLabel;
     24    ScrollBox1: TScrollBox;
    2225    procedure FormCreate(Sender: TObject);
    2326  public
     
    3134{$R *.lfm}
    3235
    33 uses
    34   Core;
    35 
    3636{ TFormNew }
    3737
    3838procedure TFormNew.FormCreate(Sender: TObject);
    3939var
    40   I: TTileSkin;
     40  TileSkin: TTileSkin;
     41  ColorPalette: TColorPalette;
    4142begin
    4243  ComboBoxSkin.Items.BeginUpdate;
    4344  try
    4445    ComboBoxSkin.Items.Clear;
    45     for I := Low(SkinText) to High(SkinText) do
    46       ComboBoxSkin.Items.Add(SkinText[I]);
     46    for TileSkin := Low(SkinText) to High(SkinText) do
     47      ComboBoxSkin.Items.Add(SkinText[TileSkin]);
    4748  finally
    4849    ComboBoxSkin.Items.EndUpdate;
     50  end;
     51
     52  ComboBoxColorPalette.Items.BeginUpdate;
     53  try
     54    ComboBoxColorPalette.Items.Clear;
     55    for ColorPalette := Low(ColorPaletteText) to High(ColorPaletteText) do
     56      ComboBoxColorPalette.Items.Add(ColorPaletteText[ColorPalette]);
     57  finally
     58    ComboBoxColorPalette.Items.EndUpdate;
    4959  end;
    5060end;
     
    5666  CheckBoxRecordHistory.Checked := Game.RecordHistory;
    5767  ComboBoxSkin.ItemIndex := Integer(Game.Skin);
     68  ComboBoxColorPalette.ItemIndex := Integer(Game.ColorPalette);
    5869end;
    5970
     
    6475  Game.RecordHistory := CheckBoxRecordHistory.Checked;
    6576  Game.Skin := TTileSkin(ComboBoxSkin.ItemIndex);
     77  Game.ColorPalette := TColorPalette(ComboBoxColorPalette.ItemIndex);
    6678end;
    6779
  • trunk/Forms/FormSettings.lfm

    r86 r89  
    11object FormSettings: TFormSettings
    2   Left = 979
    3   Height = 360
    4   Top = 385
    5   Width = 480
     2  Left = 838
     3  Height = 331
     4  Top = 468
     5  Width = 612
    66  Caption = 'Settings'
    7   ClientHeight = 360
    8   ClientWidth = 480
     7  ClientHeight = 331
     8  ClientWidth = 612
    99  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnShow = FormShow
    1212  LCLVersion = '3.4.0.0'
    13   object Label1: TLabel
    14     Left = 19
    15     Height = 26
    16     Top = 24
    17     Width = 170
    18     Caption = 'Animation duration:'
    19     ParentColor = False
    20   end
    21   object TrackBar1: TTrackBar
    22     Left = 208
    23     Height = 58
    24     Top = 16
    25     Width = 240
    26     Max = 1000
    27     Position = 0
    28     Anchors = [akTop, akLeft, akRight]
     13  object ButtonOk: TButton
     14    Left = 488
     15    Height = 38
     16    Top = 283
     17    Width = 113
     18    Anchors = [akRight, akBottom]
     19    Caption = 'OK'
    2920    TabOrder = 0
    30   end
    31   object ButtonOk: TButton
    32     Left = 112
    33     Height = 38
    34     Top = 291
    35     Width = 113
    36     Anchors = [akLeft, akBottom]
    37     Caption = 'OK'
    38     TabOrder = 1
    3921    OnClick = ButtonOkClick
    4022  end
    4123  object ButtonCancel: TButton
    42     Left = 256
     24    Left = 352
    4325    Height = 38
    44     Top = 288
     26    Top = 283
    4527    Width = 113
    46     Anchors = [akLeft, akBottom]
     28    Anchors = [akRight, akBottom]
    4729    Caption = 'Cancel'
    48     TabOrder = 2
     30    TabOrder = 1
    4931    OnClick = ButtonCancelClick
    5032  end
    51   object ComboBoxLanguage: TComboBox
    52     Left = 208
    53     Height = 42
    54     Top = 86
    55     Width = 230
    56     ItemHeight = 0
    57     Style = csDropDownList
    58     TabOrder = 3
    59   end
    60   object Label2: TLabel
    61     Left = 19
    62     Height = 26
    63     Top = 94
    64     Width = 88
    65     Caption = 'Language:'
    66     ParentColor = False
    67   end
    68   object ComboBoxTheme: TComboBox
    69     Left = 208
    70     Height = 42
    71     Top = 136
    72     Width = 230
    73     ItemHeight = 0
    74     Style = csDropDownList
    75     TabOrder = 4
    76   end
    77   object Label3: TLabel
    78     Left = 19
    79     Height = 26
    80     Top = 144
    81     Width = 63
    82     Caption = 'Theme:'
    83     ParentColor = False
     33  object ScrollBox1: TScrollBox
     34    Left = 8
     35    Height = 262
     36    Top = 8
     37    Width = 595
     38    HorzScrollBar.Page = 438
     39    VertScrollBar.Page = 178
     40    Anchors = [akTop, akLeft, akRight, akBottom]
     41    ClientHeight = 260
     42    ClientWidth = 593
     43    TabOrder = 2
     44    object Label1: TLabel
     45      Left = 19
     46      Height = 26
     47      Top = 24
     48      Width = 170
     49      Caption = 'Animation duration:'
     50      ParentColor = False
     51    end
     52    object TrackBar1: TTrackBar
     53      Left = 208
     54      Height = 58
     55      Top = 16
     56      Width = 372
     57      Max = 1000
     58      Position = 0
     59      Anchors = [akTop, akLeft, akRight]
     60      TabOrder = 0
     61    end
     62    object ComboBoxLanguage: TComboBox
     63      Left = 208
     64      Height = 42
     65      Top = 86
     66      Width = 230
     67      ItemHeight = 0
     68      Style = csDropDownList
     69      TabOrder = 1
     70    end
     71    object Label2: TLabel
     72      Left = 19
     73      Height = 26
     74      Top = 94
     75      Width = 88
     76      Caption = 'Language:'
     77      ParentColor = False
     78    end
     79    object ComboBoxTheme: TComboBox
     80      Left = 208
     81      Height = 42
     82      Top = 136
     83      Width = 230
     84      ItemHeight = 0
     85      Style = csDropDownList
     86      TabOrder = 2
     87    end
     88    object Label3: TLabel
     89      Left = 19
     90      Height = 26
     91      Top = 144
     92      Width = 63
     93      Caption = 'Theme:'
     94      ParentColor = False
     95    end
    8496  end
    8597end
  • trunk/Forms/FormSettings.lrj

    r86 r89  
    11{"version":1,"strings":[
    22{"hash":213582195,"name":"tformsettings.caption","sourcebytes":[83,101,116,116,105,110,103,115],"value":"Settings"},
    3 {"hash":10139450,"name":"tformsettings.label1.caption","sourcebytes":[65,110,105,109,97,116,105,111,110,32,100,117,114,97,116,105,111,110,58],"value":"Animation duration:"},
    43{"hash":1339,"name":"tformsettings.buttonok.caption","sourcebytes":[79,75],"value":"OK"},
    54{"hash":77089212,"name":"tformsettings.buttoncancel.caption","sourcebytes":[67,97,110,99,101,108],"value":"Cancel"},
     5{"hash":10139450,"name":"tformsettings.label1.caption","sourcebytes":[65,110,105,109,97,116,105,111,110,32,100,117,114,97,116,105,111,110,58],"value":"Animation duration:"},
    66{"hash":82521866,"name":"tformsettings.label2.caption","sourcebytes":[76,97,110,103,117,97,103,101,58],"value":"Language:"},
    77{"hash":95339402,"name":"tformsettings.label3.caption","sourcebytes":[84,104,101,109,101,58],"value":"Theme:"}
  • trunk/Forms/FormSettings.pas

    r86 r89  
    1919    Label2: TLabel;
    2020    Label3: TLabel;
     21    ScrollBox1: TScrollBox;
    2122    TrackBar1: TTrackBar;
    2223    procedure ButtonCancelClick(Sender: TObject);
Note: See TracChangeset for help on using the changeset viewer.