DEADSOFTWARE

Darken everything beyond map borders
authorJoseph Stalin <granminigun@pm.me>
Sat, 30 Nov 2019 14:39:39 +0000 (19:39 +0500)
committerJoseph Stalin <granminigun@pm.me>
Sat, 30 Nov 2019 14:44:28 +0000 (19:44 +0500)
Also finally "fixed" editor options form. Yay.

src/editor/f_options.lfm
src/editor/g_map.pas

index c6e3e9bc5aaf2a02f280b97f080555391131c6f1..f82ccf8dc9b8860737c012e0919541d2fdd0a150 100644 (file)
@@ -1,12 +1,12 @@
 object OptionsForm: TOptionsForm
   Left = 202
-  Height = 300
+  Height = 310
   Top = 174
   Width = 435
   BorderIcons = [biSystemMenu]
   BorderStyle = bsSingle
   Caption = 'Настройки редактора'
-  ClientHeight = 285
+  ClientHeight = 310
   ClientWidth = 435
   Color = clBtnFace
   Font.Color = clWindowText
@@ -17,10 +17,10 @@ object OptionsForm: TOptionsForm
   LCLVersion = '1.8.4.0'
   object GroupBox1: TGroupBox
     Left = 8
-    Height = 248
+    Height = 272
     Top = 0
     Width = 425
-    ClientHeight = 246
+    ClientHeight = 272
     ClientWidth = 423
     TabOrder = 0
     object sDotColor: TShape
@@ -298,7 +298,7 @@ object OptionsForm: TOptionsForm
   object bOK: TButton
     Left = 262
     Height = 25
-    Top = 256
+    Top = 280
     Width = 75
     Caption = 'ОК'
     Default = True
@@ -308,7 +308,7 @@ object OptionsForm: TOptionsForm
   object bCancel: TButton
     Left = 358
     Height = 25
-    Top = 256
+    Top = 280
     Width = 75
     Cancel = True
     Caption = 'Отмена'
index 2f1435c51577c7fab7cbaba5f666688b39fa7414..6c6f191e3e816b20f2a71d2899c6b51403f2a29c 100644 (file)
@@ -2720,25 +2720,25 @@ begin
 // Границы карты:
   if PreviewMode = 0 then
   begin
-    e_DrawFillQuad(-32+MapOffset.X,
-                   -32+MapOffset.Y,
-                   gMapInfo.Width+31+MapOffset.X,
-                   -1+MapOffset.Y,
+    e_DrawFillQuad(0,
+                   0,
+                   MainForm.RenderPanel.Width,
+                   -1 + MapOffset.Y,
                    drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Top
-    e_DrawFillQuad(-32+MapOffset.X,
-                   gMapInfo.Height+MapOffset.Y,
-                   gMapInfo.Width+31+MapOffset.X,
-                   gMapInfo.Height+31+MapOffset.Y,
+    e_DrawFillQuad(0,
+                   gMapInfo.Height + MapOffset.Y,
+                   MainForm.RenderPanel.Width,
+                   MainForm.RenderPanel.Height,
                    drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Bottom
-    e_DrawFillQuad(-32+MapOffset.X,
+    e_DrawFillQuad(0,
                    MapOffset.Y,
-                   -1+MapOffset.X,
-                   gMapInfo.Height+MapOffset.Y-1,
+                   -1 + MapOffset.X,
+                   gMapInfo.Height + MapOffset.Y - 1,
                    drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Left
-    e_DrawFillQuad(gMapInfo.Width+MapOffset.X,
+    e_DrawFillQuad(gMapInfo.Width + MapOffset.X,
                    MapOffset.Y,
-                   gMapInfo.Width+31+MapOffset.X,
-                   gMapInfo.Height+MapOffset.Y-1,
+                   MainForm.RenderPanel.Width,
+                   gMapInfo.Height + MapOffset.Y - 1,
                    drEdge[0], drEdge[1], drEdge[2], drEdge[3], B_NONE); // Right
   end;
 end;