index 1f297ec217b0a6f7ba490f50f63a858f876d053b..91cc695d1e442dc03753e43b1de29ff63e8443a9 100644 (file)
--- a/src/editor/f_options.pas
+++ b/src/editor/f_options.pas
uses
LCLIntf, LCLType, SysUtils, Variants, Classes,
Graphics, Controls, Forms, Dialogs, StdCtrls,
- ExtCtrls, ComCtrls, Registry;
+ ExtCtrls, ComCtrls, Registry, Math;
type
+
+ { TOptionsForm }
+
TOptionsForm = class (TForm)
bOK: TButton;
bCancel: TButton;
cbCheckerboard: TCheckBox;
+ cbCompress: TCheckBox;
+ cbBackup: TCheckBox;
ColorDialog: TColorDialog;
GroupBox1: TGroupBox;
// Общие настройки:
implementation
uses
- f_main, StdConvs, CONFIG, g_language;
+ f_main, StdConvs, CONFIG, g_language, g_resources;
{$R *.lfm}
sBackColor.Brush.Color := BackColor;
sPreviewColor.Brush.Color := PreviewColor;
cbCheckerboard.Checked := UseCheckerboard;
+ cbCompress.Checked := Compress;
+ cbBackup.Checked := Backup;
if Scale = 2 then
cbScale.ItemIndex := 1
else
d1 := True
else
d1 := False;
- DotStepOne := StrToIntDef(eDotStepOne.Text, 16);
- DotStepTwo := StrToIntDef(eDotStepTwo.Text, 8);
+ DotStepOne := EnsureRange(StrToIntDef(eDotStepOne.Text, 16), 4, 2048);
+ DotStepTwo := EnsureRange(StrToIntDef(eDotStepTwo.Text, 8), 4, 2048);
if d1 then
DotStep := DotStepOne
else
BackColor := sBackColor.Brush.Color;
PreviewColor := sPreviewColor.Brush.Color;
UseCheckerboard := cbCheckerboard.Checked;
+ Compress := cbCompress.Checked;
+ Backup := cbBackup.Checked;
if cbScale.ItemIndex = 1 then
Scale := 2
config.WriteInt('Editor', 'Scale', cbScale.ItemIndex);
config.WriteInt('Editor', 'RecentCount', re);
config.WriteStr('Editor', 'Language', gLanguage);
+ config.WriteBool('Editor', 'Compress', Compress);
+ config.WriteBool('Editor', 'Backup', Backup);
if RecentCount <> re then
begin