Ignore:
Timestamp:
Jan 17, 2022, 4:53:31 PM (3 years ago)
Author:
chronos
Message:
  • Added: Two more code examples.
  • Added: Allow to disable debugging support.
  • Added: Remember last opened tab in options form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormOptions.pas

    r126 r128  
    1616    ButtonOk: TButton;
    1717    ButtonCancel: TButton;
    18     CheckBox1: TCheckBox;
     18    CheckBoxReopenLastFile: TCheckBox;
    1919    CheckBoxDPIAuto: TCheckBox;
    2020    CheckBoxOptimizeAddSub: TCheckBox;
     21    CheckBoxDebugEnabled: TCheckBox;
    2122    CheckBoxOptimizeCopyMultiply: TCheckBox;
    2223    CheckBoxOptimizeSetZero: TCheckBox;
     
    9697  ComboBoxTheme.ItemIndex := ComboBoxTheme.Items.IndexOfObject(Core.ThemeManager.Theme);
    9798  if ComboBoxTheme.ItemIndex = -1 then ComboBoxTheme.ItemIndex := 0;
    98   CheckBox1.Checked := Core.OpenProjectOnStart;
     99  CheckBoxReopenLastFile.Checked := Core.OpenProjectOnStart;
    99100  CheckBoxOptimizeAddSub.Checked := Core.Optimizations.AddSub;
    100101  CheckBoxOptimizeSetZero.Checked := Core.Optimizations.SetZero;
     
    108109  SpinEditCellSize.Value := Core.CellSize;
    109110  SpinEditMemorySize.Value := Core.MemorySize;
     111  CheckBoxDebugEnabled.Checked := Core.DebugEnabled;
     112  if Core.OptionsFormTabIndex < PageControl1.PageCount then
     113    PageControl1.TabIndex := Core.OptionsFormTabIndex
     114    else PageControl1.TabIndex := 0;
    110115  UpdateInterface;
    111116end;
     
    117122  if ComboBoxTheme.ItemIndex <> -1 then
    118123    Core.ThemeManager.Theme := TTheme(ComboBoxTheme.Items.Objects[ComboBoxTheme.ItemIndex]);
    119   Core.OpenProjectOnStart := CheckBox1.Checked;
     124  Core.OpenProjectOnStart := CheckBoxReopenLastFile.Checked;
    120125  Core.ScaleDPI1.DPI := Point(SpinEditDPIX.Value, SpinEditDPIY.Value);
    121126  Core.ScaleDPI1.AutoDetect := CheckBoxDPIAuto.Checked;
     
    128133  Core.Optimizations.RelativeIndexes := CheckBoxOptimizeRelativeIndexes.Checked;
    129134  Core.Optimizations.CopyMultiply := CheckBoxOptimizeCopyMultiply.Checked;
     135  Core.DebugEnabled := CheckBoxDebugEnabled.Checked;
     136  Core.OptionsFormTabIndex := PageControl1.TabIndex;
    130137end;
    131138
Note: See TracChangeset for help on using the changeset viewer.