Correct positioning sidepanels

Sidepanels of the world editors got shifted due to the introduction of the editor tab. Several corrected overall. Some minor tweaks to be expected in a later commit.
This commit is contained in:
Nils Eikelenboom 2024-09-10 20:39:54 +02:00
parent b0a11d79d5
commit 8b049e3b01
15 changed files with 17 additions and 17 deletions

View file

@ -31,7 +31,7 @@ function EVPathEditor::maxSize(%this, %window)
%fixedWindow = VPathEditorTreeWindow;
%fluidWindow = VPathEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -276,7 +276,7 @@ function ConvexEditorGui::maxSize(%this, %window)
%this.resizing = false;
%fluidWindow = ConvexEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%position = Canvas.extent.x - %fluidWindow.extent.x SPC %top;

View file

@ -824,7 +824,7 @@ function DatablockEditorGui::maxSize(%this, %window)
%fixedWindow = DatablockEditorTreeWindow;
%fluidWindow = DatablockEditorInspectorWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -54,7 +54,7 @@ function DecalEditorGui::maxSize(%this, %window)
%fixedWindow = DecalEditorWindow;
%fluidWindow = DecalPreviewWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -56,7 +56,7 @@ function ForestEditorGui::maxSize(%this, %window)
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -284,7 +284,7 @@ function MaterialEditorGui::maxSize(%this, %window)
%fixedWindow = MaterialEditorPreviewWindow;
%fluidWindow = MaterialEditorPropertiesWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -43,7 +43,7 @@ function MeshRoadEditorGui::maxSize(%this, %window)
%fixedWindow = MeshRoadEditorTreeWindow;
%fluidWindow = MeshRoadEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -54,7 +54,7 @@ function MissionAreaEditorGui::maxSize(%this, %window)
%fixedWindow = MissionAreaEditorTerrainWindow;
%fluidWindow = MissionAreaEditorPropertiesWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -69,7 +69,7 @@ function NavEditorGui::maxSize(%this, %window)
%fixedWindow = NavEditorTreeWindow;
%fluidWindow = NavEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -276,7 +276,7 @@ function ParticleEditor::maxSize(%this, %window)
// prevent onResize after a resize
%this.resizing = false;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -60,7 +60,7 @@ function RiverEditorGui::maxSize(%this, %window)
%fixedWindow = RiverEditorTreeWindow;
%fluidWindow = RiverEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -73,7 +73,7 @@ function RoadEditorGui::maxSize(%this, %window)
%fixedWindow = RoadEditorTreeWindow;
%fluidWindow = RoadEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;

View file

@ -1,11 +1,11 @@
// Let's check if the ShapeEdAdvancedWindow can be stacked in the side panel
if (getWord($pref::Video::mode, 1) > 899 && isObject(ShapeEdSelectWindow) && isObject(ShapeEdPropWindow))
{
$ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 360 SPC getWord(ShapeEdSelectWindow.extent, 1) + getWord(ShapeEdPropWindow.extent, 1) + getWord(EditorGuiToolbar.extent, 1) + 12;
$ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 360 SPC getWord(ShapeEdSelectWindow.extent, 1) + getWord(ShapeEdPropWindow.extent, 1) + getWord(EditorGuiToolbar.extent, 1) + 12 - 7;
}
else
{
$ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 720 SPC getWord(EditorGuiToolbar.extent, 1) + 6;
$ShapeEdAdvancedWindowPos = getWord($pref::Video::mode, 0) - 720 SPC getWord(EditorGuiToolbar.extent, 1) + 6 - 7;
}
//--- OBJECT WRITE BEGIN ---

View file

@ -1616,9 +1616,9 @@ function EWorldEditor::maxSize(%this, %window)
%fixedWindow = EWTreeWindow;
%fluidWindow = EWInspectorWindow;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 + 19;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;
%maxHeight = Canvas.extent.y - %top - %bottom + 12;
// --- Fixed window (top) ------------------------------------------------
// put it back if it moved

View file

@ -596,7 +596,7 @@ function TerrainPainterContainer::maxSize(%this, %window)
%fixedWindow = EPainterPreview;
%fluidWindow = EPainter;
%top = EditorGuiToolbar.extent.y + 6;
%top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;