mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
basegame script update for snapwork
This commit is contained in:
parent
f8a81d2634
commit
3f94a33a5f
3 changed files with 29 additions and 2 deletions
|
|
@ -28,7 +28,7 @@
|
||||||
canMinimize = "0";
|
canMinimize = "0";
|
||||||
canMaximize = "0";
|
canMaximize = "0";
|
||||||
position = "400 31";
|
position = "400 31";
|
||||||
extent =" 175 257";
|
extent =" 175 267";
|
||||||
MinExtent = "175 130";
|
MinExtent = "175 130";
|
||||||
text = "Snap Options";
|
text = "Snap Options";
|
||||||
closeCommand = "ESnapOptions.hideDialog();";
|
closeCommand = "ESnapOptions.hideDialog();";
|
||||||
|
|
@ -51,7 +51,7 @@
|
||||||
Visible = "1";
|
Visible = "1";
|
||||||
hovertime = "1000";
|
hovertime = "1000";
|
||||||
Docking = "Client";
|
Docking = "Client";
|
||||||
Margin = "3 22 3 3";
|
Margin = "3 32 3 3";
|
||||||
Padding = "0 0 0 0";
|
Padding = "0 0 0 0";
|
||||||
AnchorTop = "1";
|
AnchorTop = "1";
|
||||||
AnchorBottom = "0";
|
AnchorBottom = "0";
|
||||||
|
|
@ -793,6 +793,25 @@
|
||||||
canSave = "1";
|
canSave = "1";
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
};
|
};
|
||||||
|
new GuiCheckBoxCtrl() {
|
||||||
|
text = "Use Group Center";
|
||||||
|
groupNum = "1";
|
||||||
|
useMouseEvents = "0";
|
||||||
|
isContainer = "0";
|
||||||
|
horizSizing = "right";
|
||||||
|
vertSizing = "top";
|
||||||
|
position = "4 246";
|
||||||
|
extent = "105 24";
|
||||||
|
minExtent = "8 8";
|
||||||
|
visible = "1";
|
||||||
|
active = "1";
|
||||||
|
command = "toggleSnappingOptions(\"byGroup\");";
|
||||||
|
tooltipProfile = "ToolsGuiToolTipProfile";
|
||||||
|
hovertime = "1000";
|
||||||
|
internalName = "GroupSnapButton";
|
||||||
|
canSave = "1";
|
||||||
|
canSaveDynamicFields = "0";
|
||||||
|
};
|
||||||
new GuiTextCtrl() {
|
new GuiTextCtrl() {
|
||||||
text = "Size";
|
text = "Size";
|
||||||
maxLength = "1024";
|
maxLength = "1024";
|
||||||
|
|
|
||||||
|
|
@ -2050,12 +2050,14 @@ function EWorldEditor::syncGui( %this )
|
||||||
EWorldEditorToolbar-->renderHandleBtn.setStateOn( EWorldEditor.renderObjHandle );
|
EWorldEditorToolbar-->renderHandleBtn.setStateOn( EWorldEditor.renderObjHandle );
|
||||||
EWorldEditorToolbar-->renderTextBtn.setStateOn( EWorldEditor.renderObjText );
|
EWorldEditorToolbar-->renderTextBtn.setStateOn( EWorldEditor.renderObjText );
|
||||||
|
|
||||||
|
EWorldEditorToolbar-->objectSnapDownBtn.setStateOn( %this.stickToGround );
|
||||||
SnapToBar-->objectSnapBtn.setStateOn( EWorldEditor.getSoftSnap() );
|
SnapToBar-->objectSnapBtn.setStateOn( EWorldEditor.getSoftSnap() );
|
||||||
EWorldEditorToolbar-->softSnapSizeTextEdit.setText( EWorldEditor.getSoftSnapSize() );
|
EWorldEditorToolbar-->softSnapSizeTextEdit.setText( EWorldEditor.getSoftSnapSize() );
|
||||||
ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() );
|
ESnapOptions-->SnapSize.setText( EWorldEditor.getSoftSnapSize() );
|
||||||
ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() );
|
ESnapOptions-->GridSize.setText( EWorldEditor.getGridSize() );
|
||||||
|
|
||||||
ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() );
|
ESnapOptions-->GridSnapButton.setStateOn( %this.getGridSnap() );
|
||||||
|
ESnapOptions-->GroupSnapButton.setStateOn( %this.UseGroupCenter );
|
||||||
SnapToBar-->objectGridSnapBtn.setStateOn( %this.getGridSnap() );
|
SnapToBar-->objectGridSnapBtn.setStateOn( %this.getGridSnap() );
|
||||||
ESnapOptions-->NoSnapButton.setStateOn( !%this.stickToGround && !%this.getSoftSnap() && !%this.getGridSnap() );
|
ESnapOptions-->NoSnapButton.setStateOn( !%this.stickToGround && !%this.getSoftSnap() && !%this.getGridSnap() );
|
||||||
}
|
}
|
||||||
|
|
@ -2458,6 +2460,11 @@ function toggleSnappingOptions( %var )
|
||||||
{
|
{
|
||||||
EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() );
|
EWorldEditor.setGridSnap( !EWorldEditor.getGridSnap() );
|
||||||
}
|
}
|
||||||
|
else if( %var $= "byGroup" )
|
||||||
|
{
|
||||||
|
EWorldEditor.UseGroupCenter = !EWorldEditor.UseGroupCenter;
|
||||||
|
ESnapOptions->GroupSnapButton.setStateOn(EWorldEditor.UseGroupCenter);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// No snapping.
|
// No snapping.
|
||||||
|
|
|
||||||
|
|
@ -315,6 +315,7 @@ function EditorGui::buildMenus(%this)
|
||||||
item[5] = "at Centroid" TAB "" TAB "atCentroid";
|
item[5] = "at Centroid" TAB "" TAB "atCentroid";
|
||||||
item[6] = "to Terrain" TAB "" TAB "toTerrain";
|
item[6] = "to Terrain" TAB "" TAB "toTerrain";
|
||||||
item[7] = "Below Selection" TAB "" TAB "belowSelection";
|
item[7] = "Below Selection" TAB "" TAB "belowSelection";
|
||||||
|
item[8] = "At Gizmo" TAB "" TAB "atGizmo";
|
||||||
};
|
};
|
||||||
|
|
||||||
%this.alignBoundsMenu = new PopupMenu()
|
%this.alignBoundsMenu = new PopupMenu()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue