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; %fixedWindow = VPathEditorTreeWindow;
%fluidWindow = VPathEditorOptionsWindow; %fluidWindow = VPathEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6; %top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6; %bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom; %maxHeight = Canvas.extent.y - %top - %bottom;

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -73,7 +73,7 @@ function RoadEditorGui::maxSize(%this, %window)
%fixedWindow = RoadEditorTreeWindow; %fixedWindow = RoadEditorTreeWindow;
%fluidWindow = RoadEditorOptionsWindow; %fluidWindow = RoadEditorOptionsWindow;
%top = EditorGuiToolbar.extent.y + 6; %top = EditorGuiToolbar.extent.y + 6 - 7;
%bottom = %top + 65 - 6; %bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom; %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 // Let's check if the ShapeEdAdvancedWindow can be stacked in the side panel
if (getWord($pref::Video::mode, 1) > 899 && isObject(ShapeEdSelectWindow) && isObject(ShapeEdPropWindow)) 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 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 --- //--- OBJECT WRITE BEGIN ---

View file

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

View file

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