mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Merge pull request #565 from Areloch/BugfixQOL_20210909
Bugfix qol 20210909
This commit is contained in:
commit
86fbb3748b
44 changed files with 694 additions and 755 deletions
|
|
@ -672,16 +672,21 @@ function GuiEditor::onControlDropped(%this, %payload, %position)
|
|||
{
|
||||
// Make sure we have the right kind of D&D.
|
||||
|
||||
if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) )
|
||||
if( !%payload.parentGroup.isInNamespaceHierarchy( "GuiDragAndDropControlType_GuiControl" ) &&
|
||||
!%payload.parentGroup.isInNamespaceHierarchy( "AssetPreviewControlType_AssetDrop" ))
|
||||
return;
|
||||
|
||||
%pos = %payload.getGlobalPosition();
|
||||
%x = getWord(%pos, 0);
|
||||
%y = getWord(%pos, 1);
|
||||
|
||||
%this.addNewCtrl(%payload);
|
||||
%asset = %payload.assetName;
|
||||
%cmd = "return new " @ %asset @ "();";
|
||||
%ctrl = eval( %cmd );
|
||||
|
||||
%this.addNewCtrl(%ctrl);
|
||||
|
||||
%payload.setPositionGlobal(%x, %y);
|
||||
%ctrl.setPositionGlobal(%x, %y);
|
||||
%this.setFirstResponder();
|
||||
}
|
||||
|
||||
|
|
@ -846,6 +851,8 @@ function GuiEditorTabBook::onWake( %this )
|
|||
item[ 0 ] = "Alphabetical View" TAB "" TAB "GuiEditorToolbox.setViewType( \"Alphabetical\" );";
|
||||
item[ 1 ] = "Categorized View" TAB "" TAB "GuiEditorToolbox.setViewType( \"Categorized\" );";
|
||||
};
|
||||
|
||||
GlobalActionMap.bindCmd( keyboard, space, "", "AssetBrowser.toggleDialog();" );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
|
|
@ -1010,6 +1017,8 @@ function GuiEditorGui::onWake( %this )
|
|||
|
||||
function GuiEditorGui::onSleep( %this)
|
||||
{
|
||||
GlobalActionMap.unbind( keyboard, space );
|
||||
|
||||
// If we are editing a control, store its guide state.
|
||||
|
||||
%content = GuiEditor.getContentControl();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue