Ignore:
Timestamp:
Dec 26, 2014, 3:04:52 PM (10 years ago)
Author:
chronos
Message:
  • Modified: Enabled DPI settings for DEBUG build mode.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormSettings.pas

    r97 r99  
    77uses
    88  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
    9   Spin;
     9  Spin, ComCtrls;
    1010
    1111type
     
    1717    ButtonCancel: TButton;
    1818    CheckBox1: TCheckBox;
     19    CheckBox2: TCheckBox;
    1920    CheckBoxDevelMode: TCheckBox;
    2021    ComboBoxLanguage: TComboBox;
     
    2223    Label2: TLabel;
    2324    Label3: TLabel;
     25    Label4: TLabel;
     26    Label5: TLabel;
     27    PageControl1: TPageControl;
     28    SpinEditX: TSpinEdit;
     29    SpinEditY: TSpinEdit;
    2430    SpinEditAnimSpeed: TSpinEdit;
     31    TabSheetGeneral: TTabSheet;
     32    TabSheetDebug: TTabSheet;
     33    procedure CheckBox2Change(Sender: TObject);
     34    procedure FormCreate(Sender: TObject);
     35    procedure FormShow(Sender: TObject);
    2536  private
    2637    { private declarations }
     
    4253{ TFormSettings }
    4354
     55procedure TFormSettings.CheckBox2Change(Sender: TObject);
     56begin
     57  SpinEditX.Enabled := not CheckBox2.Checked;
     58  SpinEditY.Enabled := not CheckBox2.Checked;
     59end;
     60
     61procedure TFormSettings.FormCreate(Sender: TObject);
     62begin
     63  PageControl1.TabIndex := 0;
     64end;
     65
     66procedure TFormSettings.FormShow(Sender: TObject);
     67begin
     68
     69end;
     70
    4471procedure TFormSettings.Load;
    4572begin
     
    4976  CheckBoxDevelMode.Checked := Core.DevelMode;
    5077  SpinEditAnimSpeed.Value := Core.AnimationSpeed;
     78  CheckBox2.Checked := Core.ScaleDPI1.AutoDetect;
     79  SpinEditX.Value := Core.ScaleDPI1.DPI.X;
     80  SpinEditY.Value := Core.ScaleDPI1.DPI.Y;
    5181  {$IFDEF DEBUG}
    52   CheckBoxDevelMode.Visible := True;
     82  TabSheetDebug.Visible := True;
    5383  {$ELSE}
    54    CheckBoxDevelMode.Visible := False;
     84  TabSheetDebug.Visible := False;
    5585  {$ENDIF}
    5686end;
     
    6292  Core.DevelMode := CheckBoxDevelMode.Checked;
    6393  Core.AnimationSpeed := SpinEditAnimSpeed.Value;
     94  Core.ScaleDPI1.AutoDetect := CheckBox2.Checked;
     95  Core.ScaleDPI1.DPI := Point(SpinEditX.Value, SpinEditY.Value);
    6496end;
    6597
Note: See TracChangeset for help on using the changeset viewer.