Implementation of Nils' UI work for updated theming, functionality and style for the editors suite

This commit is contained in:
Areloch 2023-09-08 22:44:18 -05:00
parent dc1d6e7d9d
commit 33f35d35d4
908 changed files with 15381 additions and 3065 deletions

View file

@ -35,17 +35,18 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
canSaveDynamicFields = "1";
new GuiWindowCollapseCtrl(ForestEditorPalleteWindow) {
canCollapse = "0";
CollapseGroup = "-1";
CollapseGroupNum = "-1";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = "Forest Editor";
text = ":: Forest Editor - Pallete";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
@ -56,10 +57,10 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiWindowCollapseProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
Position = getWord($pref::Video::mode, 0) - 209
SPC getWord(EditorGuiToolbar.extent, 1)-1;
Extent = "210 252";
MinExtent = "210 100";
Position = getWord($pref::Video::mode, 0) - 360
SPC getWord(EditorGuiToolbar.extent, 1) + 6;
Extent = "360 300";
MinExtent = "300 100";
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
@ -284,7 +285,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "170 25";
position = "310 25";
Extent = "35 17";
MinExtent = "16 16";
canSave = "1";
@ -303,7 +304,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "0 0";
position = "1 0";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
@ -323,7 +324,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "19 0";
position = "21 0";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
@ -347,7 +348,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "151 25";
position = "291 25";
Extent = "54 17";
MinExtent = "16 16";
canSave = "1";
@ -373,7 +374,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Visible = "1";
Command = "ForestEditorGui.newBrush();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Add New Brush Group";
ToolTip = "Add New Brush Group" NL " " NL "Hint: Prepare a brush element before creating a brush group.";
hovertime = "1000";
canSaveDynamicFields = "0";
};
@ -386,13 +387,13 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "19 0";
position = "20 0";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ForestEditorGui.newElement();";
tooltip = "Add New Brush Element";
tooltip = "Add New Brush Element" NL " " NL "Hint: Prepare a mesh before adding a brush element.";
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
@ -406,31 +407,125 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "38 0";
position = "40 0";
Extent = "16 16";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "ForestEditorGui.deleteBrushOrElement();";
tooltip = "Delete Selected";
tooltip = "Delete Selected.";
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
canSaveDynamicFields = "0";
};
};
// window / panel buttons
new GuiBitmapButtonCtrl(ForestEditorGui_UnDockBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "330 1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "0";
Command = "ForestEditorGui.releaseSidePanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Detach Sidepanel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_undock_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl(ForestEditorGui_DockBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "330 1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "0";
Command = "ForestEditorGui.dockSidePanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Dock Sidepanel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_dock_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl(ForestEditorGui_HideBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = "312 1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ForestEditorGui.hideSidePanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Hide Sidepanel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_hide_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl(ForestEditorGui_ShowBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "4 1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "ForestEditorGui.showSidePanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Show Sidepanel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_show_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
};
new GuiWindowCollapseCtrl(ForestEditorPropertiesWindow) {
canCollapse = "0";
CollapseGroup = "-1";
CollapseGroupNum = "-1";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
EdgeSnap = "1";
text = "Properties";
text = ":: Forest Editor - Properties";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
@ -441,10 +536,10 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
Profile = "ToolsGuiWindowCollapseProfile";
HorizSizing = "windowRelative";
VertSizing = "windowRelative";
Position = getWord($pref::Video::mode, 0) - 209
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(ForestEditorPalleteWindow.extent, 1) - 2;
Extent = "210 460";
MinExtent = "210 50";
Position = getWord($pref::Video::mode, 0) - 360
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(ForestEditorPalleteWindow.extent, 1) + 6;
Extent = "360" SPC getWord($pref::Video::mode, 1) - getWord(ForestEditorPalleteWindow.extent, 1) - getWord(EditorGuiToolbar.extent, 1) - 65;
MinExtent = "300 50";
canSave = "1";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
@ -452,7 +547,7 @@ $guiContent = new ForestEditorCtrl(ForestEditorGui,EditorGuiGroup) {
internalName = "PropertiesWindow";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
new GuiScrollCtrl(ForestEditorPropertiesScroll) {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";

View file

@ -20,9 +20,265 @@
// IN THE SOFTWARE.
//-----------------------------------------------------------------------------
// ForestEditorGui Script Methods
//-----------------------------------------------------------------------------
function ForestEditorGui::onWake(%this)
{
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1)
{
// Let's dock the side panel to the right side
%this.docked = false;
%this.resizing = true;
%this.dockSidePanel();
}
else
{
// Let's release the side panel so it can be moved
%this.docked = true;
%this.resizing = false;
%this.releaseSidePanel();
}
}
function ForestEditorGui::maxSize(%this, %window)
{
// Resize the windows to the max height
// and force these to the right side if set
if(EditorSettings.value( "WorldEditor/forceSidebarToSide" ) == 1 && %this.resizing == true)
{
// prevent onResize after a resize
%this.resizing = false;
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
%top = EditorGuiToolbar.extent.y + 6;
%bottom = %top + 65 - 6;
%maxHeight = Canvas.extent.y - %top - %bottom;
// --- Fixed window (top) ------------------------------------------------
// put it back if it moved
%fixedWindow.position.x = Canvas.extent.x - %fixedWindow.extent.x;
%fixedWindow.position.y = %top;
// don't go beyond the canvas
if(%fixedWindow.extent.y > %maxHeight)
%fixedWindow.extent.y = %maxHeight - %fluidWindow.extent.y;
%position = %fixedWindow.position.x SPC %fixedWindow.position.y;
%extent = %window.extent.x SPC %fixedWindow.extent.y;
%fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
// --- Fluid window (bottom) ---------------------------------------------
// position is relative to the top window
%position = %fixedWindow.position.x SPC %fixedWindow.extent.y + %top;
%extent = %window.extent.x SPC Canvas.extent.y - %fixedWindow.extent.y - %bottom;
%fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
// --- AssetBrowser window ----------------------------------------------
if(isObject(AssetBrowserWindow))
{
// Only resize the AssetBrowser if it's docked
if(AssetBrowserWindow.docked == true)
{
// The width is relative to the sidepanel
%browserWidth = Canvas.extent.x - %extent.x;
%browserHeight = AssetBrowserWindow.extent.y;
%browserPosY = Canvas.extent.y - AssetBrowserWindow.extent.y - 33;
AssetBrowserWindow.resize(0, %browserPosY, %browserWidth, %browserHeight);
}
}
// --- Windowed Console --------------------------------------------------
if(isObject(windowConsoleControl))
{
// Only resize the AssetBrowser if it's docked
if(windowConsoleControl.docked == true)
{
// The width is relative to the sidepanel
%consoleWidth = Canvas.extent.x - %extent.x;
%consoleHeight = windowConsoleControl.extent.y;
%consolePosY = Canvas.extent.y - windowConsoleControl.extent.y - 33;
windowConsoleControl.resize(0, %consolePosY, %consoleWidth, %consoleHeight);
}
}
}
}
function ForestEditorPalleteWindow::onMouseDragged(%this)
{
%parent = ForestEditorGui;
if(%parent.panelHidden == true)
{
%parent.showSidePanel();
}
if(%parent.resizing == false && %parent.docked == true)
{
%parent.resizing = true;
%parent.maxSize(%this);
}
}
function ForestEditorPropertiesWindow::onMouseDragged(%this)
{
%parent = ForestEditorGui;
if(%parent.panelHidden == true)
{
%parent.showSidePanel();
}
if(%parent.resizing == false && %parent.docked == true)
{
%parent.resizing = true;
%parent.maxSize(%this);
}
}
function ForestEditorGui::onResize(%this, %newPosition, %newExtent)
{
// Window to focus on (mostly the fluid window)
%window = ForestEditorPropertiesWindow;
if(%window.panelHidden == true)
{
%window.showSidePanel();
}
if(%this.resizing == false && %this.docked == true)
{
// Only resize once
%this.resizing = true;
%this.maxSize(%window);
}
}
function ForestEditorGui::dockSidePanel()
{
%parent = ForestEditorGui;
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
if(%parent.docked == true)
return;
// Move and resize the window(s)
%parent.resizing = true;
%parent.maxSize(%fluidWindow);
%parent.docked = true;
%fluidWindow.onMouseDragged();
// Lock the windows in place
%fixedWindow.canCollapse = "0";
%fixedWindow.canMove = "0";
%fluidWindow.canCollapse = "0";
%fluidWindow.canMove = "0";
ForestEditorGui_UnDockBtn.Visible = "1";
ForestEditorGui_DockBtn.Visible = "0";
ForestEditorGui_showBtn.Visible = "0";
ForestEditorGui_hideBtn.Visible = "1";
}
function ForestEditorGui::releaseSidePanel()
{
%parent = ForestEditorGui;
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
if(%parent.docked == false)
return;
// Unlock the windows so that be moved
%fixedWindow.canCollapse = "1";
%fixedWindow.canMove = "1";
%fluidWindow.canCollapse = "1";
%fluidWindow.canMove = "1";
ForestEditorGui_UnDockBtn.Visible = "0";
ForestEditorGui_DockBtn.Visible = "1";
ForestEditorGui_showBtn.Visible = "0";
ForestEditorGui_hideBtn.Visible = "0";
// Let's do a small resize so it's visually clear we're undocking
%position = %fixedWindow.position.x - 6 SPC %fixedWindow.position.y + 6;
%extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y;
%fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
%position = %fluidWindow.position.x - 6 SPC %fluidWindow.position.y + 6;
%extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y - 12;
%fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
%parent.docked = false;
%parent.resizing = false;
}
function ForestEditorGui::hideSidePanel()
{
%parent = ForestEditorGui;
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
ForestEditorGui_showBtn.Visible = "1";
ForestEditorGui_hideBtn.Visible = "0";
// hide the content of the panels
%fixedWindow.titleText = %fixedWindow.text;
%fluidWindow.titleText = %fluidWindow.text;
%fixedWindow.text = "";
ForestEditTabBook.Visible = "0";
%fluidWindow.text = "";
ForestEditorPropertiesScroll.Visible = "0";
// Let's do a resize so that the panel is collapsed to the side
%position = Canvas.extent.x - 24 SPC %fixedWindow.position.y;
%extent = %fixedWindow.extent.x SPC %fixedWindow.extent.y;
%fixedWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
%position = Canvas.extent.x - 24 SPC %fluidWindow.position.y;
%extent = %fluidWindow.extent.x SPC %fluidWindow.extent.y;
%fluidWindow.resize(%position.x, %position.y, %extent.x, %extent.y);
%parent.panelHidden = true;
}
function ForestEditorGui::showSidePanel()
{
%parent = ForestEditorGui;
%fixedWindow = ForestEditorPalleteWindow;
%fluidWindow = ForestEditorPropertiesWindow;
ForestEditorGui_showBtn.Visible = "0";
ForestEditorGui_hideBtn.Visible = "1";
// show the content of the panels
// hide the content of the panels
%fixedWindow.text = %fixedWindow.titleText;
ForestEditTabBook.Visible = "1";
%fluidWindow.text = %fluidWindow.titleText;
ForestEditorPropertiesScroll.Visible = "1";
%parent.resizing = true;
%parent.maxSize(%fluidWindow);
%parent.panelHidden = false;
}
//-----------------------------------------------------------------------------
function ForestEditorGui::setActiveTool( %this, %tool )
{
if ( %tool == ForestTools->BrushTool )
@ -526,7 +782,7 @@ function ForestEditorInspector::onInspectorFieldModified( %this, %object, %field
function ForestEditorInspector::onFieldSelected( %this, %fieldName, %fieldTypeStr, %fieldDoc )
{
//FieldInfoControl.setText( "<font:Arial Bold:14>" @ %fieldName @ "<font:Arial Italic:14> (" @ %fieldTypeStr @ ") " NL "<font:Arial:14>" @ %fieldDoc );
//FieldInfoControl.setText( "<font:" @ $Gui::fontTypeBold @ ":16>" @ %fieldName @ "<font:Arial Italic:14> (" @ %fieldTypeStr @ ") " @ " : " @ "<font:Arial:14>" @ %fieldDoc );
}
function ForestBrushSizeSliderCtrlContainer::onWake(%this)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 751 B

After

Width:  |  Height:  |  Size: 792 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1,012 B

After

Width:  |  Height:  |  Size: 795 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

After

Width:  |  Height:  |  Size: 736 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 797 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 945 B

After

Width:  |  Height:  |  Size: 841 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

After

Width:  |  Height:  |  Size: 795 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 908 B

After

Width:  |  Height:  |  Size: 782 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 744 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 677 B

After

Width:  |  Height:  |  Size: 523 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 694 B

After

Width:  |  Height:  |  Size: 516 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 693 B

After

Width:  |  Height:  |  Size: 499 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 636 B

After

Width:  |  Height:  |  Size: 376 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 519 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 482 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

After

Width:  |  Height:  |  Size: 463 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 709 B

After

Width:  |  Height:  |  Size: 630 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 722 B

After

Width:  |  Height:  |  Size: 586 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

After

Width:  |  Height:  |  Size: 396 B

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 940 B

After

Width:  |  Height:  |  Size: 1.3 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 754 B

After

Width:  |  Height:  |  Size: 723 B

Before After
Before After