summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f622519)
raw | patch | inline | side by side (parent: f622519)
author | binarymaster <x86corez@gmail.com> | |
Mon, 25 Sep 2017 12:57:29 +0000 (15:57 +0300) | ||
committer | binarymaster <x86corez@gmail.com> | |
Mon, 25 Sep 2017 12:57:29 +0000 (15:57 +0300) |
src/editor/f_main.lfm | patch | blob | history | |
src/editor/f_main.pas | patch | blob | history |
diff --git a/src/editor/f_main.lfm b/src/editor/f_main.lfm
index fcc7377e6df71a29c4e52a7d2adb963b3cb7cd50..d35946313f732d2b62f4064ef5577e59885b3f97 100644 (file)
--- a/src/editor/f_main.lfm
+++ b/src/editor/f_main.lfm
OnKeyDown = FormKeyDown
OnKeyUp = FormKeyUp
OnResize = FormResize
- Position = poDefault
LCLVersion = '1.6.0.4'
object Splitter1: TSplitter
Left = 518
diff --git a/src/editor/f_main.pas b/src/editor/f_main.pas
index d429811c6222c2066fb0ab2a8f4acde2e9aa11ce..8fd1fa3372b6a4e87fe52580603a0f3a82def031 100644 (file)
--- a/src/editor/f_main.pas
+++ b/src/editor/f_main.pas
config := TConfig.CreateFile(EditorDir+'Editor.cfg');
+ if config.ReadInt('Editor', 'XPos', -1) = -1 then
+ Position := poDesktopCenter
+ else begin
+ Left := config.ReadInt('Editor', 'XPos', Left);
+ Top := config.ReadInt('Editor', 'YPos', Top);
+ Width := config.ReadInt('Editor', 'Width', Width);
+ Height := config.ReadInt('Editor', 'Height', Height);
+ end;
if config.ReadBool('Editor', 'Maximize', False) then
WindowState := wsMaximized;
ShowMap := config.ReadBool('Editor', 'Minimap', False);
begin
config := TConfig.CreateFile(EditorDir+'Editor.cfg');
+ config.WriteInt('Editor', 'XPos', Left);
+ config.WriteInt('Editor', 'YPos', Top);
+ config.WriteInt('Editor', 'Width', Width);
+ config.WriteInt('Editor', 'Height', Height);
config.WriteBool('Editor', 'Maximize', WindowState = wsMaximized);
config.WriteBool('Editor', 'Minimap', ShowMap);
config.WriteInt('Editor', 'PanelProps', PanelProps.ClientWidth);