index 8a77b180abf987c647abd3e97d36d7b7b9ae0c2c..feffc4b02ee4064d0366689e4828cad70d01cae5 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
implementation
uses
- f_main, StdConvs, CONFIG, g_language, g_resources;
+ f_main, StdConvs, CONFIG, g_language, g_resources, g_options;
{$R *.lfm}
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
else
DotSize := 1;
- config := TConfig.CreateFile(EditorDir+'Editor.cfg');
+ config := TConfig.CreateFile(CfgFileName);
config.WriteInt('Editor', 'DotColor', DotColor);
config.WriteBool('Editor', 'DotEnable', DotEnable);
MainForm.RefreshRecentMenu();
end;
- config.SaveFile(EditorDir+'Editor.cfg');
+ config.SaveFile(CfgFileName);
config.Free();
Close();
end;