From 8b049e3b018a38550357effe4f388ad78a9f470b Mon Sep 17 00:00:00 2001 From: Nils Eikelenboom Date: Tue, 10 Sep 2024 20:39:54 +0200 Subject: [PATCH] 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. --- .../BaseGame/game/tools/VPathEditor/Scripts/GuiScript.tscript | 2 +- .../BaseGame/game/tools/convexEditor/convexEditorGui.tscript | 2 +- .../game/tools/datablockEditor/datablockEditor.tscript | 2 +- .../BaseGame/game/tools/decalEditor/decalEditorGui.tscript | 2 +- .../BaseGame/game/tools/forestEditor/forestEditorGui.tscript | 2 +- .../tools/materialEditor/scripts/materialEditor.ed.tscript | 2 +- .../game/tools/meshRoadEditor/meshRoadEditorGui.tscript | 2 +- .../tools/missionAreaEditor/missionAreaEditorGui.ed.tscript | 2 +- Templates/BaseGame/game/tools/navEditor/navEditor.tscript | 2 +- .../game/tools/particleEditor/particleEditor.ed.tscript | 2 +- .../BaseGame/game/tools/riverEditor/riverEditorGui.tscript | 2 +- .../BaseGame/game/tools/roadEditor/roadEditorGui.tscript | 2 +- .../game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui | 4 ++-- .../game/tools/worldEditor/scripts/EditorGui.ed.tscript | 4 ++-- .../worldEditor/scripts/editors/terrainEditor.ed.tscript | 2 +- 15 files changed, 17 insertions(+), 17 deletions(-) diff --git a/Templates/BaseGame/game/tools/VPathEditor/Scripts/GuiScript.tscript b/Templates/BaseGame/game/tools/VPathEditor/Scripts/GuiScript.tscript index 434b01e0c..9206acf58 100644 --- a/Templates/BaseGame/game/tools/VPathEditor/Scripts/GuiScript.tscript +++ b/Templates/BaseGame/game/tools/VPathEditor/Scripts/GuiScript.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript index 3e18ff75d..006e03ea6 100644 --- a/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript +++ b/Templates/BaseGame/game/tools/convexEditor/convexEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript index 5f9d23d78..0bd07cfdc 100644 --- a/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript +++ b/Templates/BaseGame/game/tools/datablockEditor/datablockEditor.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript index 33b0034c4..2c214d19e 100644 --- a/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript +++ b/Templates/BaseGame/game/tools/decalEditor/decalEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript index e99a0ac73..03620d7bc 100644 --- a/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript +++ b/Templates/BaseGame/game/tools/forestEditor/forestEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript index ccd93fee2..a72d02511 100644 --- a/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/materialEditor/scripts/materialEditor.ed.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.tscript b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.tscript index 8f472816b..fcc1888c4 100644 --- a/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.tscript +++ b/Templates/BaseGame/game/tools/meshRoadEditor/meshRoadEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.tscript b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.tscript index 00fb08f31..0de382c0f 100644 --- a/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.tscript +++ b/Templates/BaseGame/game/tools/missionAreaEditor/missionAreaEditorGui.ed.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/navEditor/navEditor.tscript b/Templates/BaseGame/game/tools/navEditor/navEditor.tscript index c1d9ea04f..f011bbecf 100644 --- a/Templates/BaseGame/game/tools/navEditor/navEditor.tscript +++ b/Templates/BaseGame/game/tools/navEditor/navEditor.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.tscript b/Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.tscript index 99a9024fd..c000b5a18 100644 --- a/Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/particleEditor/particleEditor.ed.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/riverEditor/riverEditorGui.tscript b/Templates/BaseGame/game/tools/riverEditor/riverEditorGui.tscript index c36141774..29afdaa4d 100644 --- a/Templates/BaseGame/game/tools/riverEditor/riverEditorGui.tscript +++ b/Templates/BaseGame/game/tools/riverEditor/riverEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/roadEditor/roadEditorGui.tscript b/Templates/BaseGame/game/tools/roadEditor/roadEditorGui.tscript index f4cd9c147..fd41ab1b2 100644 --- a/Templates/BaseGame/game/tools/roadEditor/roadEditorGui.tscript +++ b/Templates/BaseGame/game/tools/roadEditor/roadEditorGui.tscript @@ -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; diff --git a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui index 74c61fe37..c15d8f728 100644 --- a/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui +++ b/Templates/BaseGame/game/tools/shapeEditor/gui/shapeEdAdvancedWindow.ed.gui @@ -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 --- diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript index da922d89f..9a8fe9716 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/EditorGui.ed.tscript @@ -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 diff --git a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript index 7bddbecd9..1a9d1307b 100644 --- a/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript +++ b/Templates/BaseGame/game/tools/worldEditor/scripts/editors/terrainEditor.ed.tscript @@ -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;