mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-01-19 20:24:49 +00:00
Added sanity check to reflectionProbe preview shape so if the material didn't load right, it doesn't crash Added logic to better control if module groups as a whole should fail if a module dependency in that group fails, defaulted to off Added sanity check if a shape's material failed to load so it doesn't crash when checking accumulation rules Added search bar to SimView control for easier use
238 lines
6.5 KiB
Plaintext
238 lines
6.5 KiB
Plaintext
//--- OBJECT WRITE BEGIN ---
|
|
$guiContent = new GuiControl(simViewDlg,EditorGuiGroup) {
|
|
extent = "1024 768";
|
|
minExtent = "8 8";
|
|
profile = "ToolsGuiDefaultProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
isContainer = "1";
|
|
canSaveDynamicFields = "1";
|
|
|
|
new GuiWindowCtrl() {
|
|
text = "Torque SimView";
|
|
closeCommand = "Canvas.popDialog(simViewDlg);";
|
|
position = "169 139";
|
|
extent = "685 489";
|
|
minExtent = "602 440";
|
|
horizSizing = "center";
|
|
vertSizing = "center";
|
|
profile = "ToolsGuiWindowProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
new GuiScrollCtrl() {
|
|
hScrollBar = "dynamic";
|
|
position = "10 51";
|
|
extent = "255 425";
|
|
minExtent = "8 8";
|
|
horizSizing = "width";
|
|
vertSizing = "height";
|
|
profile = "ToolsGuiScrollProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
new GuiTreeViewCtrl(InspectTreeView) {
|
|
itemHeight = "21";
|
|
position = "2 25";
|
|
extent = "212 21";
|
|
minExtent = "8 8";
|
|
profile = "ToolsGuiTreeViewProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
};
|
|
new GuiScrollCtrl() {
|
|
hScrollBar = "alwaysOff";
|
|
lockHorizScroll = "1";
|
|
position = "272 96";
|
|
extent = "404 380";
|
|
minExtent = "8 8";
|
|
horizSizing = "left";
|
|
vertSizing = "height";
|
|
profile = "ToolsGuiScrollProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
new GuiInspector(InspectFields) {
|
|
position = "1 1";
|
|
extent = "389 8";
|
|
minExtent = "8 8";
|
|
horizSizing = "width";
|
|
profile = "ToolsGuiTransparentProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
};
|
|
new GuiTextEditCtrl(SimViewTreeFilter) {
|
|
position = "11 27";
|
|
extent = "255 18";
|
|
profile = "ToolsGuiTextEditProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
placeholderText = "Filter...";
|
|
};
|
|
new GuiControl() {
|
|
position = "272 28";
|
|
extent = "403 61";
|
|
horizSizing = "left";
|
|
profile = "ToolsGuiButtonProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
isContainer = "1";
|
|
|
|
new GuiTextEditCtrl(InspectObjectName) {
|
|
position = "121 8";
|
|
extent = "195 18";
|
|
minExtent = "8 8";
|
|
profile = "ToolsGuiTextEditProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiTextCtrl() {
|
|
text = "Sim ID:";
|
|
position = "217 35";
|
|
extent = "44 18";
|
|
minExtent = "8 8";
|
|
profile = "GuiTextProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiTextCtrl() {
|
|
text = "Internal Name:";
|
|
position = "10 35";
|
|
extent = "106 18";
|
|
minExtent = "8 8";
|
|
profile = "GuiTextProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiTextEditCtrl(InspectObjectInternalName) {
|
|
position = "121 35";
|
|
extent = "93 18";
|
|
minExtent = "8 8";
|
|
profile = "ToolsGuiTextEditProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiTextCtrl() {
|
|
text = "Selected Object:";
|
|
position = "10 8";
|
|
extent = "106 18";
|
|
minExtent = "8 8";
|
|
profile = "GuiTextProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiIconButtonCtrl() {
|
|
BitmapAsset = "ToolsModule:iconRefresh_image";
|
|
textLocation = "Right";
|
|
text = "Refresh";
|
|
position = "321 33";
|
|
extent = "76 22";
|
|
profile = "ToolsGuiButtonProfile";
|
|
command = "InspectApply();";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiTextCtrl(InspectObjectSimID) {
|
|
text = "0";
|
|
position = "265 35";
|
|
extent = "51 18";
|
|
minExtent = "8 8";
|
|
profile = "GuiTextProfile";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
new GuiIconButtonCtrl() {
|
|
BitmapAsset = "ToolsModule:iconDelete_image";
|
|
textLocation = "Right";
|
|
text = "Delete";
|
|
position = "321 6";
|
|
extent = "76 22";
|
|
profile = "ToolsGuiButtonProfile";
|
|
command = "InspectDelete();";
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
//--- OBJECT WRITE END ---
|
|
|
|
function Inspect(%obj)
|
|
{
|
|
// Don't inspect the root group.
|
|
if( %obj == -1 )
|
|
return;
|
|
|
|
InspectFields.inspect(%obj);
|
|
|
|
// Update selected object properties
|
|
InspectObjectName.setValue(%obj.getName());
|
|
InspectObjectInternalName.setValue( %obj.getInternalName() );
|
|
InspectObjectSimID.setValue( %obj.getId() );
|
|
|
|
// Store Object Reference
|
|
InspectObjectName.refObj = %obj;
|
|
|
|
}
|
|
|
|
function InspectApply()
|
|
{
|
|
%obj = InspectObjectName.refObj;
|
|
if( !isObject( %obj ) )
|
|
return;
|
|
|
|
// Update name and internal name
|
|
%obj.setName( InspectObjectName.getValue() );
|
|
%obj.setInternalName( InspectObjectInternalName.getValue() );
|
|
|
|
// Update inspected object information.
|
|
InspectFields.inspect( %obj );
|
|
}
|
|
|
|
function InspectDelete()
|
|
{
|
|
%obj = InspectObjectName.refObj;
|
|
if( !isObject( %obj ) )
|
|
return;
|
|
|
|
%obj.delete();
|
|
|
|
// Update inspected object information.
|
|
InspectFields.inspect( 0 );
|
|
|
|
// Update selected object properties
|
|
InspectObjectName.setValue("");
|
|
InspectObjectInternalName.setValue( "" );
|
|
InspectObjectSimID.setValue( 0 );
|
|
|
|
|
|
}
|
|
|
|
|
|
function InspectTreeView::onSelect(%this, %obj)
|
|
{
|
|
Inspect(%obj);
|
|
}
|
|
|
|
function Tree(%obj)
|
|
{
|
|
Canvas.popDialog("simViewDlg");
|
|
Canvas.pushDialog("simViewDlg", 20);
|
|
InspectTreeView.open(%obj);
|
|
}
|
|
|
|
// MM: Added Dynamic group toggle support.
|
|
function GuiInspector::toggleDynamicGroupScript(%this, %obj)
|
|
{
|
|
%this.toggleDynamicGroupExpand();
|
|
%this.inspect(%obj);
|
|
}
|
|
// MM: Added group toggle support.
|
|
function GuiInspector::toggleGroupScript(%this, %obj, %fieldName)
|
|
{
|
|
%this.toggleGroupExpand(%obj, %fieldName);
|
|
%this.inspect(%obj);
|
|
}
|
|
|
|
// MM: Set All Group State support.
|
|
function GuiInspector::setAllGroupStateScript(%this, %obj, %groupState)
|
|
{
|
|
%this.setAllGroupState(%groupState);
|
|
%this.inspect(%obj);
|
|
}
|
|
|
|
function SimViewTreeFilter::onReturn(%this)
|
|
{
|
|
%text = %this.getText();
|
|
if( %text $= "" )
|
|
%this.reset();
|
|
else
|
|
InspectTreeView.setFilterText( %text );
|
|
}
|