mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
Implementation of Nils' UI work for updated theming, functionality and style for the editors suite
This commit is contained in:
parent
dc1d6e7d9d
commit
33f35d35d4
908 changed files with 15381 additions and 3065 deletions
|
|
@ -23,7 +23,7 @@ $guiContent = new GuiControl() {
|
|||
minSize = "50 50";
|
||||
closeCommand = "DatablockEditorInspectorWindow.setVisible(false);";
|
||||
EdgeSnap = "1";
|
||||
text = "Datablock";
|
||||
text = ":: Datablock Editor - Data";
|
||||
Margin = "8 8 8 8";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
|
|
@ -34,10 +34,10 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiWindowProfile";
|
||||
HorizSizing = "windowRelative";
|
||||
VertSizing = "windowRelative";
|
||||
Position = getWord($pref::Video::mode, 0) - 209
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(DatablockEditorTreeWindow.extent, 1) - 2;
|
||||
Extent = "210 373";
|
||||
MinExtent = "210 140";
|
||||
Position = getWord($pref::Video::mode, 0) - 360
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) + getWord(DatablockEditorTreeWindow.extent, 1) + 6;
|
||||
Extent = "360" SPC getWord($pref::Video::mode, 1) - getWord(DatablockEditorTreeWindow.extent, 1) - getWord(EditorGuiToolbar.extent, 1) - 65;
|
||||
MinExtent = "300 140";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
|
|
@ -45,7 +45,7 @@ $guiContent = new GuiControl() {
|
|||
internalName = "DatablockEditorInspectorWindow";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiContainer() {
|
||||
new GuiContainer(DatablockEditorInspectorPanel) {
|
||||
Docking = "Client";
|
||||
Margin = "22 41 3 3";
|
||||
Padding = "0 0 0 0";
|
||||
|
|
@ -58,7 +58,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "4 41";
|
||||
Extent = "202 287";
|
||||
Extent = "340 287";
|
||||
MinExtent = "64 64";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -87,7 +87,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
Extent = "202 287";
|
||||
Extent = "340 287";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -108,7 +108,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "1 1";
|
||||
Extent = "190 8";
|
||||
Extent = "320 8";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -128,8 +128,8 @@ $guiContent = new GuiControl() {
|
|||
Profile = "GuiInspectorFieldInfoMLTextProfile";
|
||||
HorizSizing = "width";
|
||||
VertSizing = "top";
|
||||
position = "1 328";
|
||||
Extent = "205 14";
|
||||
position = "8" SPC getWord(DatablockEditorInspectorWindow.extent, 1) - 40;
|
||||
Extent = "330 14";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -137,7 +137,7 @@ $guiContent = new GuiControl() {
|
|||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
new GuiTextEditCtrl(DatablockFileField) {
|
||||
historySize = "0";
|
||||
password = "0";
|
||||
tabComplete = "0";
|
||||
|
|
@ -155,11 +155,12 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "bottom";
|
||||
position = "4 23";
|
||||
Extent = "159 18";
|
||||
Extent = "280 18";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Datablock File";
|
||||
hovertime = "1000";
|
||||
internalName = "DatablockFile";
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -174,7 +175,7 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "167 23";
|
||||
position = "320 23";
|
||||
Extent = "17 17";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -194,7 +195,7 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "187 23";
|
||||
position = "340 23";
|
||||
Extent = "17 17";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl() {
|
||||
$guiContent = new GuiControl(DatablockEditorGui) {
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "right";
|
||||
|
|
@ -23,7 +23,7 @@ $guiContent = new GuiControl() {
|
|||
minSize = "50 50";
|
||||
closeCommand = "DatablockInspectorTreeWindow.setVisible(false);";
|
||||
EdgeSnap = "1";
|
||||
text = "Datablock Library";
|
||||
text = ":: Datablock Editor - Library";
|
||||
Margin = "8 8 8 8";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
|
|
@ -34,10 +34,10 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiWindowProfile";
|
||||
HorizSizing = "windowRelative";
|
||||
VertSizing = "windowRelative";
|
||||
Position = getWord($pref::Video::mode, 0) - 209
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) - 1;
|
||||
Extent = "210 324";
|
||||
MinExtent = "210 140";
|
||||
Position = getWord($pref::Video::mode, 0) - 360
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) + 6;
|
||||
Extent = "360 324";
|
||||
MinExtent = "300 140";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
|
|
@ -61,7 +61,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "4 25";
|
||||
Extent = "202 294";
|
||||
Extent = "340 294";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -84,7 +84,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 19";
|
||||
Extent = "202 276";
|
||||
Extent = "320 276";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "0";
|
||||
|
|
@ -94,7 +94,7 @@ $guiContent = new GuiControl() {
|
|||
|
||||
new GuiTextEditCtrl( DatablockEditorTreeFilter ) {
|
||||
position = "2 4";
|
||||
extent = "180 18";
|
||||
extent = "300 18";
|
||||
profile = "ToolsGuiTextEditProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
|
|
@ -111,7 +111,7 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiDefaultProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "185 5";
|
||||
position = "320 5";
|
||||
Extent = "17 17";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -143,7 +143,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 25";
|
||||
Extent = "202 251";
|
||||
Extent = "320 251";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -171,7 +171,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "1 1";
|
||||
Extent = "198 21";
|
||||
Extent = "318 21";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -195,7 +195,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 19";
|
||||
Extent = "202 276";
|
||||
Extent = "340 276";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -224,7 +224,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "width";
|
||||
VertSizing = "height";
|
||||
position = "0 0";
|
||||
Extent = "202 276";
|
||||
Extent = "320 276";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -252,7 +252,7 @@ $guiContent = new GuiControl() {
|
|||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "1 1";
|
||||
Extent = "196 260";
|
||||
Extent = "318 260";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
|
|
@ -273,7 +273,7 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "190 26";
|
||||
position = "336 26";
|
||||
Extent = "16 16";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -294,7 +294,7 @@ $guiContent = new GuiControl() {
|
|||
Profile = "ToolsGuiButtonProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
position = "192 25";
|
||||
position = "336 25";
|
||||
Extent = "17 17";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
|
|
@ -306,6 +306,99 @@ $guiContent = new GuiControl() {
|
|||
internalName = "CreateSelection";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
// window / panel buttons
|
||||
new GuiBitmapButtonCtrl(DatablockEditorGui_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 = "DatablockEditorGui.releaseSidePanel();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Detach Sidepanel";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "ToolsModule:panel_undock_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(DatablockEditorGui_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 = "DatablockEditorGui.dockSidePanel();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Dock Sidepanel";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "ToolsModule:panel_dock_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(DatablockEditorGui_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 = "DatablockEditorGui.hideSidePanel();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Hide Sidepanel";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "ToolsModule:panel_hide_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
new GuiBitmapButtonCtrl(DatablockEditorGui_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 = "DatablockEditorGui.showSidePanel();";
|
||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
||||
ToolTip = "Show Sidepanel";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "ToolsModule:panel_show_n_image";
|
||||
text = "";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
|
|
@ -63,6 +63,9 @@ function DatablockEditorPlugin::onActivated( %this )
|
|||
DatablockEditorInspectorWindow.setVisible( true );
|
||||
DatablockEditorInspectorWindow.makeFirstResponder( true );
|
||||
|
||||
// Maximize the windows when set
|
||||
DatablockEditorGui.onWake();
|
||||
|
||||
%this.map.push();
|
||||
|
||||
// Set the status bar here until all tool have been hooked up
|
||||
|
|
@ -760,6 +763,270 @@ function DatablockEditorPlugin::canBeClientSideDatablock( %className )
|
|||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// GUI
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function DatablockEditorGui::onWake(%this)
|
||||
{
|
||||
%fixedWindow = MeshRoadEditorTreeWindow;
|
||||
%fluidWindow = MeshRoadEditorOptionsWindow;
|
||||
|
||||
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 DatablockEditorGui::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 = DatablockEditorTreeWindow;
|
||||
%fluidWindow = DatablockEditorInspectorWindow;
|
||||
%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 DatablockEditorTreeWindow::onMouseDragged(%this)
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
|
||||
if(%parent.panelHidden == true)
|
||||
{
|
||||
%parent.showSidePanel();
|
||||
}
|
||||
|
||||
if(%parent.resizing == false && %parent.docked == true)
|
||||
{
|
||||
%parent.resizing = true;
|
||||
%parent.maxSize(%this);
|
||||
}
|
||||
}
|
||||
|
||||
function DatablockEditorInspectorWindow::onMouseDragged(%this)
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
|
||||
if(%parent.panelHidden == true)
|
||||
{
|
||||
%parent.showSidePanel();
|
||||
}
|
||||
|
||||
if(%parent.resizing == false && %parent.docked == true)
|
||||
{
|
||||
%parent.resizing = true;
|
||||
%parent.maxSize(%this);
|
||||
}
|
||||
}
|
||||
|
||||
function DatablockEditorGui::onResize(%this, %newPosition, %newExtent)
|
||||
{
|
||||
// Window to focus on (mostly the fluid window)
|
||||
%window = DatablockEditorInspectorWindow;
|
||||
|
||||
if(%window.panelHidden == true)
|
||||
{
|
||||
%window.showSidePanel();
|
||||
}
|
||||
|
||||
if(%this.resizing == false && %this.docked == true)
|
||||
{
|
||||
// Only resize once
|
||||
%this.resizing = true;
|
||||
%this.maxSize(%window);
|
||||
}
|
||||
}
|
||||
|
||||
function DatablockEditorGui::dockSidePanel()
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
%fixedWindow = DatablockEditorTreeWindow;
|
||||
%fluidWindow = DatablockEditorInspectorWindow;
|
||||
|
||||
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";
|
||||
|
||||
DatablockEditorGui_UnDockBtn.Visible = "1";
|
||||
DatablockEditorGui_DockBtn.Visible = "0";
|
||||
|
||||
DatablockEditorGui_showBtn.Visible = "0";
|
||||
DatablockEditorGui_hideBtn.Visible = "1";
|
||||
}
|
||||
|
||||
function DatablockEditorGui::releaseSidePanel()
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
%fixedWindow = DatablockEditorTreeWindow;
|
||||
%fluidWindow = DatablockEditorInspectorWindow;
|
||||
|
||||
if(%parent.docked == false)
|
||||
return;
|
||||
|
||||
// Unlock the windows so that be moved
|
||||
%fixedWindow.canCollapse = "1";
|
||||
%fixedWindow.canMove = "1";
|
||||
|
||||
%fluidWindow.canCollapse = "1";
|
||||
%fluidWindow.canMove = "1";
|
||||
|
||||
DatablockEditorGui_UnDockBtn.Visible = "0";
|
||||
DatablockEditorGui_DockBtn.Visible = "1";
|
||||
|
||||
DatablockEditorGui_showBtn.Visible = "0";
|
||||
DatablockEditorGui_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 DatablockEditorGui::hideSidePanel()
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
%fixedWindow = DatablockEditorTreeWindow;
|
||||
%fluidWindow = DatablockEditorInspectorWindow;
|
||||
|
||||
DatablockEditorGui_showBtn.Visible = "1";
|
||||
DatablockEditorGui_hideBtn.Visible = "0";
|
||||
|
||||
// hide the content of the panels
|
||||
%fixedWindow.titleText = %fixedWindow.text;
|
||||
%fluidWindow.titleText = %fluidWindow.text;
|
||||
|
||||
%fixedWindow.text = "";
|
||||
DatablockEditorTreeTabBook.Visible = "0";
|
||||
|
||||
%fluidWindow.text = "";
|
||||
DatablockEditorInspectorPanel.Visible = "0";
|
||||
DatablockFieldInfoControl.Visible = "0";
|
||||
DatablockFileField.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 DatablockEditorGui::showSidePanel()
|
||||
{
|
||||
%parent = DatablockEditorGui;
|
||||
%fixedWindow = DatablockEditorTreeWindow;
|
||||
%fluidWindow = DatablockEditorInspectorWindow;
|
||||
|
||||
DatablockEditorGui_showBtn.Visible = "0";
|
||||
DatablockEditorGui_hideBtn.Visible = "1";
|
||||
|
||||
// show the content of the panels
|
||||
// hide the content of the panels
|
||||
%fixedWindow.text = %fixedWindow.titleText;
|
||||
DatablockEditorTreeTabBook.Visible = "1";
|
||||
|
||||
%fluidWindow.text = %fluidWindow.titleText;
|
||||
DatablockEditorInspectorPanel.Visible = "1";
|
||||
DatablockFieldInfoControl.Visible = "1";
|
||||
DatablockFileField.Visible = "1";
|
||||
|
||||
%parent.resizing = true;
|
||||
%parent.maxSize(%fluidWindow);
|
||||
|
||||
%parent.panelHidden = false;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//=============================================================================================
|
||||
// Events.
|
||||
//=============================================================================================
|
||||
|
|
@ -778,7 +1045,7 @@ function DatablockEditorInspector::onInspectorFieldModified( %this, %object, %fi
|
|||
|
||||
function DatablockEditorInspector::onFieldSelected( %this, %fieldName, %fieldTypeStr, %fieldDoc )
|
||||
{
|
||||
DatablockFieldInfoControl.setText( "<font:Arial Bold:14>" @ %fieldName @ "<font:Arial Italic:14> (" @ %fieldTypeStr @ ") " NL "<font:Arial:14>" @ %fieldDoc );
|
||||
DatablockFieldInfoControl.setText( "<font:" @ $Gui::fontTypeBold @ ":16>" @ %fieldName @ "<font:Arial Italic:14> (" @ %fieldTypeStr @ ") " @ " : " @ "<font:Arial:14>" @ %fieldDoc );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue