Changeset 103 for trunk/Forms/FormNew.pas
- Timestamp:
- Dec 9, 2024, 3:04:44 PM (13 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/FormNew.pas
r89 r103 16 16 CheckBoxRecordHistory: TCheckBox; 17 17 CheckBoxUndoEnabled: TCheckBox; 18 ComboBoxColorPalette: TComboBox;19 18 ComboBoxSize: TComboBox; 20 ComboBoxSkin: TComboBox;21 19 Label1: TLabel; 22 Label2: TLabel;23 Label3: TLabel;24 20 ScrollBox1: TScrollBox; 25 procedure FormCreate(Sender: TObject);26 21 public 27 22 procedure Load(Game: TGame); … … 35 30 36 31 { TFormNew } 37 38 procedure TFormNew.FormCreate(Sender: TObject);39 var40 TileSkin: TTileSkin;41 ColorPalette: TColorPalette;42 begin43 ComboBoxSkin.Items.BeginUpdate;44 try45 ComboBoxSkin.Items.Clear;46 for TileSkin := Low(SkinText) to High(SkinText) do47 ComboBoxSkin.Items.Add(SkinText[TileSkin]);48 finally49 ComboBoxSkin.Items.EndUpdate;50 end;51 52 ComboBoxColorPalette.Items.BeginUpdate;53 try54 ComboBoxColorPalette.Items.Clear;55 for ColorPalette := Low(ColorPaletteText) to High(ColorPaletteText) do56 ComboBoxColorPalette.Items.Add(ColorPaletteText[ColorPalette]);57 finally58 ComboBoxColorPalette.Items.EndUpdate;59 end;60 end;61 62 32 procedure TFormNew.Load(Game: TGame); 63 33 begin … … 65 35 CheckBoxUndoEnabled.Checked := Game.UndoEnabled; 66 36 CheckBoxRecordHistory.Checked := Game.RecordHistory; 67 ComboBoxSkin.ItemIndex := Integer(Game.Skin);68 ComboBoxColorPalette.ItemIndex := Integer(Game.ColorPalette);69 37 end; 70 38 … … 74 42 Game.UndoEnabled := CheckBoxUndoEnabled.Checked; 75 43 Game.RecordHistory := CheckBoxRecordHistory.Checked; 76 Game.Skin := TTileSkin(ComboBoxSkin.ItemIndex);77 Game.ColorPalette := TColorPalette(ComboBoxColorPalette.ItemIndex);78 44 end; 79 45
Note:
See TracChangeset
for help on using the changeset viewer.