From 0291b000e01d64ea23ec67f328faa925b3120a06 Mon Sep 17 00:00:00 2001 From: Nils Eikelenboom Date: Sun, 22 Sep 2024 19:36:48 +0200 Subject: [PATCH] Remove tabs from asset broser and win. console Remove the tabs from the asset browser and windowed console. There were some issues and asset browser will be changed soon. Downside is that the windowed console and asset browser will now open on top of each other. --- .../tools/assetBrowser/guis/assetBrowser.gui | 84 ------------------- .../assetBrowser/scripts/assetBrowser.tscript | 36 -------- .../windowConsole/guis/window_console.gui | 84 ------------------- .../scripts/window_console.tscript | 35 -------- 4 files changed, 239 deletions(-) diff --git a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui index e75c2e1c4..963091338 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui +++ b/Templates/BaseGame/game/tools/assetBrowser/guis/assetBrowser.gui @@ -1180,90 +1180,6 @@ $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 = ""; diff --git a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript index 861ae04af..083d0f2d9 100644 --- a/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript +++ b/Templates/BaseGame/game/tools/assetBrowser/scripts/assetBrowser.tscript @@ -92,42 +92,6 @@ function AssetBrowser::onDialogPop(%this) 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(); } diff --git a/Templates/BaseGame/game/tools/windowConsole/guis/window_console.gui b/Templates/BaseGame/game/tools/windowConsole/guis/window_console.gui index da0ce9d1c..db00a861e 100644 --- a/Templates/BaseGame/game/tools/windowConsole/guis/window_console.gui +++ b/Templates/BaseGame/game/tools/windowConsole/guis/window_console.gui @@ -304,90 +304,6 @@ $guiContent = new GuiControl(windowConsoleDlg) { canSave = "0"; canSaveDynamicFields = "0"; }; - new GuiButtonCtrl(windowConsole_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(windowConsole_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(windowConsole_Tab3) { - text = "Tab 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(windowConsole_Tab4) { - text = "Tab Text 3"; - 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(windowConsole_UnDockBtn) { canSaveDynamicFields = "0"; internalName = ""; diff --git a/Templates/BaseGame/game/tools/windowConsole/scripts/window_console.tscript b/Templates/BaseGame/game/tools/windowConsole/scripts/window_console.tscript index 26686e8cd..626b7de11 100644 --- a/Templates/BaseGame/game/tools/windowConsole/scripts/window_console.tscript +++ b/Templates/BaseGame/game/tools/windowConsole/scripts/window_console.tscript @@ -105,41 +105,6 @@ function windowConsoleDlg::showWindow(%this) $WindowConsole::Open = true; Canvas.pushDialog(%this); %this-->Scroll.setVisible(true); - - // Add a tab to the asset browser - if($AssetBrowser::Open) - { - %text = "Asset Browser"; - %command = "AssetBrowser.putToFront();"; - - AssetBrowserWindow.text = ""; - windowConsoleControl.text = ""; - - windowConsoleControl.setTab(windowConsole_Tab1, "Console Log", ""); - windowConsole_Tab1.setHidden(false); - windowConsole_Tab1.setActive(false); - - if(windowConsole_Tab2.text $= %text || windowConsole_Tab3.text $= %text || windowConsole_Tab4.text $= %text) - { - // we have a tab, don't do anything - } - else if(windowConsole_Tab2.hidden == true) - { - windowConsoleControl.setTab(windowConsole_Tab2, %text, %command); - } - else if(windowConsole_Tab3.hidden == true) - { - windowConsoleControl.setTab(windowConsole_Tab3, %text, %command); - } - else if(windowConsole_Tab4.hidden == true) - { - windowConsoleControl.setTab(windowConsole_Tab4, %text, %command); - } - else - { - warn("Ran out of tabs for AssetBrowserWindow - windowConsoleDlg::showWindow()"); - } - } } //-----------------------------------------------------------------------------