mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 07:04:36 +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
|
|
@ -21,14 +21,15 @@ $PE_guielement_ext_colorpicker = "18 18";
|
|||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiWindowCollapseCtrl(PE_Window) {
|
||||
canCollapse = "0";
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "ToolsGuiWindowProfile";
|
||||
Position = firstWord($pref::Video::mode) - 209
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) -1;
|
||||
Extent = "210 696";
|
||||
MinExtent = "210 140";
|
||||
Position = firstWord($pref::Video::mode) - 360
|
||||
SPC getWord(EditorGuiToolbar.extent, 1) + 6;
|
||||
Extent = "360" SPC getWord($pref::Video::mode, 1) - getWord(EditorGuiToolbar.extent, 1) - 65;
|
||||
MinExtent = "300 140";
|
||||
HorizSizing = "windowRelative";
|
||||
VertSizing = "windowRelative";
|
||||
canSave = "1";
|
||||
|
|
@ -42,14 +43,14 @@ $guiContent = new GuiWindowCollapseCtrl(PE_Window) {
|
|||
AnchorRight = "0";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canMove = "0";
|
||||
canClose = "0";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
closeCommand = "";
|
||||
EdgeSnap = "0";
|
||||
text = "Particle Editor";
|
||||
text = ":: Particle Editor";
|
||||
|
||||
new GuiTabBookCtrl(PE_TabBook) {
|
||||
canSaveDynamicFields = "0";
|
||||
|
|
@ -1508,6 +1509,7 @@ $guiContent = new GuiWindowCollapseCtrl(PE_Window) {
|
|||
text = "Blend Type";
|
||||
};
|
||||
new GuiPopUpMenuCtrl() {
|
||||
Profile = "ToolsGuiPopUpMenuProfile";
|
||||
internalName = "PEE_blendType";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "bottom";
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 450 B After Width: | Height: | Size: 477 B |
Binary file not shown.
|
Before Width: | Height: | Size: 492 B After Width: | Height: | Size: 458 B |
Binary file not shown.
|
Before Width: | Height: | Size: 401 B After Width: | Height: | Size: 460 B |
|
|
@ -160,7 +160,7 @@ function ParticleEditor::createParticleList( %this )
|
|||
|
||||
function ParticleEditor::openEmitterPane( %this )
|
||||
{
|
||||
PE_Window.text = "Particle Editor - Emitters";
|
||||
PE_Window.text = ":: Particle Editor - Emitters";
|
||||
PE_EmitterEditor.guiSync();
|
||||
ParticleEditor.activeEditor = PE_EmitterEditor;
|
||||
|
||||
|
|
@ -172,7 +172,7 @@ function ParticleEditor::openEmitterPane( %this )
|
|||
|
||||
function ParticleEditor::openParticlePane( %this )
|
||||
{
|
||||
PE_Window.text = "Particle Editor - Particles";
|
||||
PE_Window.text = ":: Particle Editor - Particles";
|
||||
|
||||
PE_ParticleEditor.guiSync();
|
||||
ParticleEditor.activeEditor = PE_ParticleEditor;
|
||||
|
|
@ -253,3 +253,91 @@ function PE_TabBook::onTabSelected( %this, %text, %idx )
|
|||
else
|
||||
ParticleEditor.openParticlePane();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// PE Window
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function ParticleEditor::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;
|
||||
|
||||
%top = EditorGuiToolbar.extent.y + 6;
|
||||
%bottom = %top + 65 - 6;
|
||||
%maxHeight = Canvas.extent.y - %top - %bottom;
|
||||
|
||||
// --- Fixed window (top) ------------------------------------------------
|
||||
// put it back if it moved
|
||||
%window.position.x = Canvas.extent.x - %window.extent.x;
|
||||
%window.position.y = %top;
|
||||
|
||||
// don't go beyond the canvas
|
||||
%window.extent.y = %maxHeight + 42;
|
||||
|
||||
%position = %window.position.x SPC %window.position.y;
|
||||
%extent = %window.extent.x SPC %window.extent.y;
|
||||
%window.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 PE_Window::onMouseDragged(%this)
|
||||
{
|
||||
%parent = ParticleEditor;
|
||||
|
||||
if(%parent.resizing == false)
|
||||
{
|
||||
%parent.resizing = true;
|
||||
%parent.maxSize(%this);
|
||||
}
|
||||
}
|
||||
|
||||
function ParticleEditor::onResize(%this, %newPosition, %newExtent)
|
||||
{
|
||||
// Window to focus on (mostly the fluid window)
|
||||
%window = PE_Window;
|
||||
|
||||
if(%this.resizing == false)
|
||||
{
|
||||
// Only resize once
|
||||
%this.resizing = true;
|
||||
%this.maxSize(%window);
|
||||
}
|
||||
|
||||
FieldInfoControl.position = 5 SPC EWInspectorWindow.extent.y - 40;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
Loading…
Add table
Add a link
Reference in a new issue