Fixes opening of Gui Asset from AB so it correctly opens the GUI editor, making the toolbar appear

Fixes typo'd name for material-editor menubar image
Adds probe menubar images
Adds setting menubar images
Adds probe and settings buttons to menubar
Removes unneeded tab from class visibility window popup
This commit is contained in:
Areloch 2020-12-06 08:48:35 -06:00
parent d18721d78e
commit b0f977b810
16 changed files with 60 additions and 125 deletions

View file

@ -111,6 +111,12 @@ function AssetBrowser::editGUIAsset(%this, %assetDef)
exec(%assetDef.mScriptFilePath);
}
if( EditorIsActive() && !GuiEditor.toggleIntoEditorGui )
toggleEditor( true );
if( !$InGuiEditor && !GuiEditorIsActive() )
GuiEditor.open();
GuiEditContent(%assetDef.assetName);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

@ -42,7 +42,7 @@ function initializeMaterialEditor()
//exec("./gui/profiles.ed.cs");
MaterialEditorPreviewWindow.setVisible( false );
matEd_cubemapEditor.setVisible( false );
//matEd_cubemapEditor.setVisible( false );
matEd_addCubemapWindow.setVisible( false );
MaterialEditorPropertiesWindow.setVisible( false );
@ -64,7 +64,7 @@ function MaterialEditorPlugin::onWorldEditorStartup( %this )
// Add ourselves to the ToolsToolbar
%tooltip = "Material Editor (" @ %accel @ ")";
EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/matterial-editor"), %tooltip );
EditorGui.addToToolsToolbar( "MaterialEditorPlugin", "MaterialEditorPalette", expandFilename("tools/worldEditor/images/toolbar/material-editor"), %tooltip );
//connect editor windows
GuiWindowCtrl::attach( MaterialEditorPropertiesWindow, MaterialEditorPreviewWindow);

View file

@ -1353,7 +1353,7 @@
buttonType = "PushButton";
useMouseEvents = "0";
buttonMargin = "0 4";
iconBitmap = "tools/worldEditor/images/toolbar/matterial-editor_n";
iconBitmap = "tools/worldEditor/images/toolbar/material-editor_n";
textMargin = "25";
};
new GuiCheckBoxCtrl() {

View file

@ -66,75 +66,6 @@
TabMargin = "7";
MinTabWidth = "8";
new GuiTabPageCtrl() {
canSaveDynamicFields = "0";
Profile = "ToolsGuiTabPageProfile";
HorizSizing = "width";
VertSizing = "height";
Docking = "Client";
Margin = "-1 0 0 0";
Position = "0 14";
Extent = "164 220";
MinExtent = "8 2";
canSave = "1";
Visible = "0";
hovertime = "1000";
text = "Visual";
maxLength = "255";
new GuiScrollCtrl() {
canSaveDynamicFields = "0";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiScrollProfile";
HorizSizing = "width";
VertSizing = "height";
Docking = "Client";
Position = "4 12";
Extent = "156 190";
MinExtent = "8 2";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
Margin = "0 0 0 0";
Padding = "0 0 0 0";
AnchorTop = "1";
AnchorBottom = "0";
AnchorLeft = "1";
AnchorRight = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
lockHorizScroll = "true";
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "2 0";
new GuiStackControl() {
StackingType = "Vertical";
HorizStacking = "Left to Right";
VertStacking = "Top to Bottom";
Padding = "-2";
canSaveDynamicFields = "0";
internalName = "theVisOptionsList";
Enabled = "1";
isContainer = "1";
Profile = "ToolsGuiDefaultProfile";
HorizSizing = "width";
VertSizing = "bottom";
Position = "1 0";
Extent = "156 16";
MinExtent = "16 16";
canSave = "1";
isDecoy = "0";
Visible = "1";
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
};
};
};
new GuiTabPageCtrl() {
canSaveDynamicFields = "0";
Profile = "ToolsGuiTabPageProfile";

View file

@ -8,7 +8,7 @@
HorizSizing = "right";
VertSizing = "bottom";
Position = "306 0";
Extent = "550" SPC getWord(EditorGuiToolbar.extent, 1);
Extent = "600" SPC getWord(EditorGuiToolbar.extent, 1);
MinExtent = "8 2";
canSave = "1";
Visible = "1";
@ -494,6 +494,56 @@
useMouseEvents = "0";
};
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "bakeProbesBtn";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "452 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Variable = "";
Command = "updateReflectionProbes();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Update Reflection Probes";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/probe";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl() {
canSaveDynamicFields = "0";
internalName = "editorSettingsBtn";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "484 3";
Extent = "29 27";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Variable = "";
Command = "ESettingsWindow.toggleEditorSettings();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Open Editor Settings";
hovertime = "1000";
bitmap = "tools/gui/images/menubar/settings";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiContainer(objectCenterDropdown){
Profile = "IconDropdownProfile";

View file

@ -566,7 +566,6 @@ function EditorGui::onWake( %this )
// before activating an editor plugin, so that if the plugin
// installs an ActionMap, it will be highest on the stack.
MoveMap.push();
EditorMap.push();
// Active the current editor plugin.

View file

@ -276,57 +276,6 @@ function EVisibility::onWake( %this )
%this.classArray = new ArrayObject();
%this.addClassOptions();
}
%this.updateOptions();
}
function EVisibility::updateOptions( %this )
{
// First clear the stack control.
%this-->theVisOptionsList.clear();
// Go through all the
// parameters in our array and
// create a check box for each.
for ( %i = 0; %i < %this.array.count(); %i++ )
{
%text = " " @ %this.array.getValue( %i );
%val = %this.array.getKey( %i );
%var = getWord( %val, 0 );
%toggleFunction = getWord( %val, 1 );
%textLength = strlen( %text );
%cmd = "";
if ( %toggleFunction !$= "" )
%cmd = %toggleFunction @ "( $thisControl.getValue() );";
%checkBox = new GuiCheckBoxCtrl()
{
canSaveDynamicFields = "0";
isContainer = "0";
Profile = "ToolsGuiCheckBoxListProfile";
HorizSizing = "right";
VertSizing = "bottom";
Position = "0 0";
Extent = (%textLength * 4) @ " 18";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Variable = %var;
tooltipprofile = "ToolsGuiToolTipProfile";
hovertime = "1000";
text = %text;
groupNum = "-1";
buttonType = "ToggleButton";
useMouseEvents = "0";
useInactiveState = "0";
Command = %cmd;
};
%this-->theVisOptionsList.addGuiControl( %checkBox );
}
}
function EVisibility::addOption( %this, %text, %varName, %toggleFunction )