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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

After

Width:  |  Height:  |  Size: 945 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="assetBrowser_n_image"
imageFile="@assetFile=assetBrowser_n.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 9 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.9 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before After
Before After

View file

@ -30,7 +30,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "321 334";
position = "120 334";
extent = "381 99";
minExtent = "48 92";
horizSizing = "center";
@ -138,8 +138,8 @@ $guiContent = new GuiControl(AssetBrowser) {
};
};
new GuiWindowCtrl(AssetBrowserWindow) {
text = "Asset Browser";
resizeWidth = "1";
text = ":: Asset Browser";
resizeWidth = "0";
resizeHeight = "1";
canMove = "1";
canClose = "1";
@ -154,9 +154,10 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "204 80";
extent = "615 608";
minExtent = "383 274";
//position = "204 80";
Position = "0" SPC getWord($pref::Video::mode, 1) - 360 - 60;
extent = getWord($pref::Video::mode, 0) - 360 SPC "360";
minExtent = "360 120";
horizSizing = "windowRelative";
vertSizing = "windowRelative";
profile = "ToolsGuiWindowProfile";
@ -181,7 +182,7 @@ $guiContent = new GuiControl(AssetBrowser) {
dynamicSize = "0";
padding = "0 0 0 0";
position = "0 24";
extent = "615 30";
extent = "615 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -196,19 +197,19 @@ $guiContent = new GuiControl(AssetBrowser) {
canSaveDynamicFields = "0";
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:phone_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Left";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 0";
extent = "30 30";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -222,21 +223,22 @@ $guiContent = new GuiControl(AssetBrowser) {
internalName = "windowOptionsButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:plus_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "30 0";
extent = "30 30";
position = "32 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -250,21 +252,22 @@ $guiContent = new GuiControl(AssetBrowser) {
class="CreateAssetButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:import_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "60 0";
extent = "30 30";
position = "64 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -279,21 +282,22 @@ $guiContent = new GuiControl(AssetBrowser) {
command="AssetBrowser.importNewFile();";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:filter_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "90 0";
extent = "30 30";
position = "96 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -308,21 +312,22 @@ $guiContent = new GuiControl(AssetBrowser) {
internalName = "filterAssetsButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:gear_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "120 0";
extent = "30 30";
position = "128 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -337,21 +342,22 @@ $guiContent = new GuiControl(AssetBrowser) {
internalName = "editAssetSettingsButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:warning_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "4";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "150 0";
extent = "30 30";
position = "160 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
@ -366,6 +372,37 @@ $guiContent = new GuiControl(AssetBrowser) {
internalName = "AutoImportAssetButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
new GuiIconButtonCtrl() {
buttonMargin = "0 0";
bitmapAsset = "ToolsModule:console_image";
iconLocation = "Left";
sizeIconToButton = "0";
makeIconSquare = "0";
textLocation = "Center";
textMargin = "0";
autoSize = "0";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "192 0";
extent = "32 32";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiDefaultProfile";
visible = "1";
active = "1";
command = "windowConsoleDlg.showWindow();";
tooltipProfile = "GuiToolTipProfile";
tooltip = "Open the console log in a window.";
hovertime = "1000";
isContainer = "0";
internalName = "ABwindowConsoleButton";
canSave = "1";
canSaveDynamicFields = "0";
buttonMargin = "-2 0";
};
};
new GuiSplitContainer(AssetBrowser_MainSplit) {
@ -373,7 +410,7 @@ $guiContent = new GuiControl(AssetBrowser) {
splitterSize = "2";
splitPoint = "190 100";
fixedPanel = "None";
fixedSize = "468";
fixedSize = "280";
docking = "None";
margin = "0 0 0 0";
padding = "0 0 0 0";
@ -382,7 +419,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "3 56";
extent = "608 532";
extent = getWord($pref::Video::mode, 0) - 360 - 2 SPC "280";
minExtent = "64 64";
horizSizing = "relative";
vertSizing = "height";
@ -404,7 +441,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "188 532";
extent = "188 280";
minExtent = "0 0";
horizSizing = "right";
vertSizing = "bottom";
@ -480,7 +517,7 @@ $guiContent = new GuiControl(AssetBrowser) {
buttonType = "PushButton";
useMouseEvents = "0";
position = "173 4";
extent = "15 15";
extent = "16 16";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "bottom";
@ -496,7 +533,7 @@ $guiContent = new GuiControl(AssetBrowser) {
canSaveDynamicFields = "0";
};
};
new GuiContainer() {
new GuiContainer(AssetBrowserTreePanel) {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
@ -504,7 +541,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "0 17";
extent = "188 516";
extent = "188 260";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
@ -517,7 +554,7 @@ $guiContent = new GuiControl(AssetBrowser) {
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
new GuiScrollCtrl(AssetBrowserTreeScroll) {
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "dynamic";
@ -534,7 +571,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "188 516";
extent = "188 260";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
@ -596,7 +633,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "192 0";
extent = "416 532";
extent = "416 260";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
@ -868,7 +905,7 @@ $guiContent = new GuiControl(AssetBrowser) {
canSaveDynamicFields = "0";
};
};
new GuiContainer() {
new GuiContainer(AssetListContainer) {
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
@ -876,7 +913,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "1";
position = "1 37";
extent = "416 495";
extent = "416 240";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
@ -906,7 +943,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "416 479";
extent = "416 220";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
@ -922,7 +959,7 @@ $guiContent = new GuiControl(AssetBrowser) {
new GuiMouseEventCtrl(AssetListPanelInputs) {
lockMouse = "0";
position = "1 1";
extent = "414 472";
extent = "414 220";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
@ -996,11 +1033,11 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 479";
extent = "416 16";
position = "0 220";
extent = "300 16";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
vertSizing = "top";
profile = "ToolsGuiSolidDefaultProfile";
visible = "1";
active = "1";
@ -1020,7 +1057,7 @@ $guiContent = new GuiControl(AssetBrowser) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 475";
position = "0 220";
extent = "269 23";
minExtent = "8 2";
horizSizing = "right";
@ -1044,8 +1081,8 @@ $guiContent = new GuiControl(AssetBrowser) {
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "-2 200";
extent = "18 18";
position = "-2 120";
extent = "16 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "center";
@ -1068,7 +1105,7 @@ $guiContent = new GuiControl(AssetBrowser) {
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "559 588";
position = "120 340";
extent = "53 19";
minExtent = "8 2";
horizSizing = "left";
@ -1087,8 +1124,8 @@ $guiContent = new GuiControl(AssetBrowser) {
};
new GuiBitmapCtrl() {
bitmapAsset = "ToolsModule:smaller_image";
position = "5 588";
extent = "20 20";
position = "5 338";
extent = "16 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "top";
@ -1109,7 +1146,7 @@ $guiContent = new GuiControl(AssetBrowser) {
useFillBar = "0";
fillBarColor = "255 255 255 255";
renderTicks = "0";
position = "28 590";
position = "24 340";
extent = "75 20";
minExtent = "8 2";
horizSizing = "right";
@ -1129,8 +1166,8 @@ $guiContent = new GuiControl(AssetBrowser) {
};
new GuiBitmapCtrl() {
bitmapAsset = "ToolsModule:larger_image";
position = "103 588";
extent = "20 20";
position = "103 338";
extent = "16 16";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "top";
@ -1143,6 +1180,136 @@ $guiContent = new GuiControl(AssetBrowser) {
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(assetBrowser_Tab1) {
text = "Tab1 Text 1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "5 1";
extent = "95 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiEditorTabButton";
visible = "1";
hidden = "1";
active = "1";
command = "";
tooltipProfile = "ToolsGuiToolTipProfile";
ToolTip = "Bring this window to the front";
hovertime = "1000";
isContainer = "0";
canSave = "0";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(assetBrowser_Tab2) {
text = "Tab1 Text 2";
buttonType = "PushButton";
useMouseEvents = "0";
position = "105 1";
extent = "95 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiEditorTabButton";
visible = "1";
hidden = "1";
active = "1";
command = "";
tooltipProfile = "ToolsGuiToolTipProfile";
ToolTip = "Bring this window to the front";
hovertime = "1000";
isContainer = "0";
canSave = "0";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(assetBrowser_Tab3) {
text = "Tab1 Text 3";
buttonType = "PushButton";
useMouseEvents = "0";
position = "205 1";
extent = "95 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiEditorTabButton";
visible = "1";
hidden = "1";
active = "1";
command = "";
tooltipProfile = "ToolsGuiToolTipProfile";
ToolTip = "Bring this window to the front";
hovertime = "1000";
isContainer = "0";
canSave = "0";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(assetBrowser_Tab4) {
text = "Tab1 Text 4";
buttonType = "PushButton";
useMouseEvents = "0";
position = "305 1";
extent = "95 20";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "ToolsGuiEditorTabButton";
visible = "1";
hidden = "1";
active = "1";
command = "";
tooltipProfile = "ToolsGuiToolTipProfile";
ToolTip = "Bring this window to the front";
hovertime = "1000";
isContainer = "0";
canSave = "0";
canSaveDynamicFields = "0";
};
new GuiBitmapButtonCtrl(AssetBrowserWindow_UnDockBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = getWord($pref::Video::mode, 0) - 407 SPC "1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
Command = "AssetBrowserWindow.releasePanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Detach Panel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_undock_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
new GuiBitmapButtonCtrl(AssetBrowserWindow_DockBtn) {
canSaveDynamicFields = "0";
internalName = "";
Enabled = "1";
isContainer = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
Position = getWord($pref::Video::mode, 0) - 407 SPC "1";
Extent = "18 18";
MinExtent = "8 8";
canSave = "1";
Visible = "0";
Command = "AssetBrowserWindow.dockPanel();";
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Dock Panel";
hovertime = "1000";
bitmapAsset = "ToolsModule:panel_dock_n_image";
text = "";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
};
};
};
//--- OBJECT WRITE END ---

View file

@ -18,14 +18,14 @@ function AssetBrowser::addToolbarButton(%this)
tooltipprofile = "ToolsGuiToolTipProfile";
ToolTip = "Asset Browser";
hovertime = "750";
bitmapAsset = "ToolsModule:menuGrid_n_image";
bitmapAsset = "ToolsModule:assetBrowser_n_image";
bitmapMode = "Stretched";
buttonType = "PushButton";
buttonType = "ToggleButton";
groupNum = "0";
useMouseEvents = "0";
};
ToolsToolbarArray.add(%button);
EWToolsToolbar.setExtent((25 + 8) * (ToolsToolbarArray.getCount()) + 12 SPC "33");
EWToolsToolbar.setExtent((29 + 4) * (ToolsToolbarArray.getCount()) + 4 SPC "32");
}
//
@ -73,12 +73,84 @@ function AssetBrowser::onAdd(%this)
function AssetBrowser::onWake(%this)
{
%this.initialize();
// Make the window fit next to the side panel
// We do a simple resize so that we don't have to redo the whole GUI layout
%newWidth = getWord($pref::Video::mode, 0) - 360;
%vertPos = getWord($pref::Video::mode, 1) - 360 - 35;
AssetBrowserWindow.resize("0", %vertPos, %newWidth, "360");
AssetBrowserWindow.dockPanel();
}
function AssetBrowser::onDialogPop(%this)
{
$AssetBrowser::Open = false;
%lastPosExt = AssetBrowserWindow.position SPC AssetBrowserWindow.extent;
EditorSettings.setValue("Assets/Browser/LastPosExt", %lastPosExt);
EditorSettings.setValue("Assets/Browser/LastPosExt", %lastPosExt);
}
function AssetBrowser::onDialogPush(%this)
{
$AssetBrowser::Open = true;
// Add a tab to the windowed console
if($WindowConsole::Open)
{
%text = "Console Log";
%command = "windowConsoleControl.putToFront();";
AssetBrowserWindow.text = "";
windowConsoleControl.text = "";
AssetBrowser.setTab(assetBrowser_Tab1, "Asset Browser", "");
assetBrowser_Tab1.setHidden(false);
assetBrowser_Tab1.setActive(false);
if(assetBrowser_Tab2.text $= %text || assetBrowser_Tab3.text $= %text || assetBrowser_Tab4.text $= %text)
{
// we have a tab, don't do anything
}
else if(assetBrowser_Tab2.hidden == true)
{
AssetBrowser.setTab(assetBrowser_Tab2, %text, %command);
}
else if(assetBrowser_Tab3.hidden == true)
{
AssetBrowser.setTab(assetBrowser_Tab3, %text, %command);
}
else if(assetBrowser_Tab4.hidden == true)
{
AssetBrowser.setTab(assetBrowser_Tab4, %text, %command);
}
else
{
warn("Ran out of tabs for AssetBrowserWindow - windowConsoleDlg::showWindow()");
}
}
EditorGui.updateSideBar();
}
function AssetBrowser::setTab(%this, %tab, %text, %command)
{
if(isObject(%tab))
{
%tab.setActive(true);
%tab.setHidden(false);
%tab.setText(%text);
%tab.command = %command;
}
}
function AssetBrowser::putToFront(%this)
{
// Close the object
AssetBrowser.hideDialog();
// Create the object again so it will render on top
AssetBrowser.ShowDialog();
// Put the focus on this window
AssetBrowser.restoreLastPosExt();
AssetBrowserWindow.selectWindow();
}
function AssetBrowser::restoreLastPosExt(%this)
@ -88,6 +160,7 @@ function AssetBrowser::restoreLastPosExt(%this)
{
AssetBrowserWindow.resize(getWord(%lastPosExt, 0), getWord(%lastPosExt, 1), getWord(%lastPosExt, 2), getWord(%lastPosExt, 3));
}
EditorGui.updateSideBar();
}
function contentTreeTabBook::onTabSelected(%this, %tabText, %tabIndex)
@ -304,6 +377,11 @@ function AssetBrowser::showDialog( %this, %AssetTypeFilter, %selectCallback, %ta
AssetBrowserWindow.setVisible(1);
AssetBrowserWindow.selectWindow();
if(AssetBrowserWindow.docked)
AssetBrowserWindow.dockPanel();
else
AssetBrowserWindow.releasePanel();
//If we're special-case filtering(like for selecting a given type), then ignore our normal
//visibility filter
if(%AssetTypeFilter !$= "")
@ -511,7 +589,7 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
extent = %previewSize.x SPC %previewSize.y + %textBottomPad;
buttonType = "RadioButton";
buttonMargin = "0 -10";
profile = ToolsGuiDefaultProfile;
profile = ToolsGuiDefaultIconBtnProfile;
};
%previewScaleSize = AssetBrowser-->previewSlider.getValue();
@ -526,8 +604,9 @@ function AssetBrowser::buildAssetPreview( %this, %asset, %moduleName )
{
%previewButton.iconLocation = "Left";
%previewButton.textLocation = "Right";
%previewButton.setextent(120,20);
%previewButton.buttonMargin = "0 0";
%previewButton.setextent(160,34);
%previewButton.buttonMargin = "8 8";
%previewButton.textMargin = "6";
AssetBrowser.previewListMode = true;
}
@ -2710,7 +2789,8 @@ function AssetBrowser::importLooseFiles(%this)
LooseFileAuditWindow.showDialog(%this.dirHandler.currentAddress);
}
//
// -----------------------------------------------------------------------------
function getAssetPreviewImage(%asset)
{
if(isFile(%asset))
@ -2755,4 +2835,48 @@ function getAssetPreviewImage(%asset)
%previewPath = "ToolsModule:unknownImage_image";
return %previewPath;
}
// -----------------------------------------------------------------------------
function AssetBrowserWindow::dockPanel(%this)
{
if(%this.docked == true)
return;
%this.resizing = true;
%this.docked = true;
%this.canCollapse = "0";
%this.canMove = "0";
%this.resizeWidth = "0";
AssetBrowserWindow_UnDockBtn.Visible = "1";
AssetBrowserWindow_DockBtn.Visible = "0";
EditorGui.updateSideBar();
}
function AssetBrowserWindow::releasePanel(%this)
{
if(%this.docked == false)
return;
%this.canCollapse = "1";
%this.canMove = "1";
%this.resizeWidth = "1";
AssetBrowserWindow_UnDockBtn.Visible = "0";
AssetBrowserWindow_DockBtn.Visible = "1";
// Let's do a small resize so it's visually clear we're "undocking"
%position = %this.position.x + 6 SPC %this.position.y - 6;
%extent = %this.extent.x SPC %this.extent.y;
%this.resize(%position.x, %position.y, %extent.x, %extent.y);
%this.docked = false;
%this.resizing = false;
EditorGui.updateSideBar();
}