2017-02-24 02:40:56 -06:00
|
|
|
//--- OBJECT WRITE BEGIN ---
|
2023-05-08 21:18:23 -05:00
|
|
|
$guiContent = new GuiControl(simViewDlg,EditorGuiGroup) {
|
|
|
|
|
extent = "1024 768";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "ToolsGuiDefaultProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
|
isContainer = "1";
|
|
|
|
|
canSaveDynamicFields = "1";
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
new GuiWindowCtrl() {
|
|
|
|
|
text = "Torque SimView";
|
|
|
|
|
closeCommand = "Canvas.popDialog(simViewDlg);";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "169 139";
|
|
|
|
|
extent = "685 489";
|
|
|
|
|
minExtent = "602 440";
|
|
|
|
|
horizSizing = "center";
|
|
|
|
|
vertSizing = "center";
|
|
|
|
|
profile = "ToolsGuiWindowProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
new GuiScrollCtrl() {
|
|
|
|
|
hScrollBar = "dynamic";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "10 51";
|
|
|
|
|
extent = "255 425";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
horizSizing = "width";
|
|
|
|
|
vertSizing = "height";
|
|
|
|
|
profile = "ToolsGuiScrollProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
new GuiTreeViewCtrl(InspectTreeView) {
|
|
|
|
|
itemHeight = "21";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "2 25";
|
|
|
|
|
extent = "212 21";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "ToolsGuiTreeViewProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
new GuiScrollCtrl() {
|
|
|
|
|
hScrollBar = "alwaysOff";
|
2023-05-08 21:18:23 -05:00
|
|
|
lockHorizScroll = "1";
|
|
|
|
|
position = "272 96";
|
|
|
|
|
extent = "404 380";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
horizSizing = "left";
|
|
|
|
|
vertSizing = "height";
|
|
|
|
|
profile = "ToolsGuiScrollProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
new GuiInspector(InspectFields) {
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "1 1";
|
|
|
|
|
extent = "389 8";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
horizSizing = "width";
|
|
|
|
|
profile = "ToolsGuiTransparentProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
};
|
2023-05-08 21:18:23 -05:00
|
|
|
new GuiTextEditCtrl(SimViewTreeFilter) {
|
|
|
|
|
position = "11 27";
|
|
|
|
|
extent = "255 18";
|
|
|
|
|
profile = "ToolsGuiTextEditProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
|
placeholderText = "Filter...";
|
|
|
|
|
};
|
2017-02-24 02:40:56 -06:00
|
|
|
new GuiControl() {
|
|
|
|
|
position = "272 28";
|
2023-05-08 21:18:23 -05:00
|
|
|
extent = "403 61";
|
|
|
|
|
horizSizing = "left";
|
|
|
|
|
profile = "ToolsGuiButtonProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
|
|
|
|
isContainer = "1";
|
2017-02-24 02:40:56 -06:00
|
|
|
|
|
|
|
|
new GuiTextEditCtrl(InspectObjectName) {
|
|
|
|
|
position = "121 8";
|
2023-05-08 21:18:23 -05:00
|
|
|
extent = "195 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "ToolsGuiTextEditProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiTextCtrl() {
|
|
|
|
|
text = "Sim ID:";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "217 35";
|
|
|
|
|
extent = "44 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "GuiTextProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiTextCtrl() {
|
|
|
|
|
text = "Internal Name:";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "10 35";
|
|
|
|
|
extent = "106 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "GuiTextProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiTextEditCtrl(InspectObjectInternalName) {
|
|
|
|
|
position = "121 35";
|
2023-05-08 21:18:23 -05:00
|
|
|
extent = "93 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "ToolsGuiTextEditProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiTextCtrl() {
|
|
|
|
|
text = "Selected Object:";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "10 8";
|
|
|
|
|
extent = "106 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "GuiTextProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiIconButtonCtrl() {
|
2023-05-08 21:18:23 -05:00
|
|
|
BitmapAsset = "ToolsModule:iconRefresh_image";
|
2017-02-24 02:40:56 -06:00
|
|
|
textLocation = "Right";
|
2023-05-08 21:18:23 -05:00
|
|
|
text = "Refresh";
|
|
|
|
|
position = "321 33";
|
|
|
|
|
extent = "76 22";
|
|
|
|
|
profile = "ToolsGuiButtonProfile";
|
|
|
|
|
command = "InspectApply();";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiTextCtrl(InspectObjectSimID) {
|
|
|
|
|
text = "0";
|
2023-05-08 21:18:23 -05:00
|
|
|
position = "265 35";
|
|
|
|
|
extent = "51 18";
|
|
|
|
|
minExtent = "8 8";
|
|
|
|
|
profile = "GuiTextProfile";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
new GuiIconButtonCtrl() {
|
2023-05-08 21:18:23 -05:00
|
|
|
BitmapAsset = "ToolsModule:iconDelete_image";
|
2017-02-24 02:40:56 -06:00
|
|
|
textLocation = "Right";
|
2023-05-08 21:18:23 -05:00
|
|
|
text = "Delete";
|
|
|
|
|
position = "321 6";
|
|
|
|
|
extent = "76 22";
|
|
|
|
|
profile = "ToolsGuiButtonProfile";
|
|
|
|
|
command = "InspectDelete();";
|
|
|
|
|
tooltipProfile = "GuiToolTipProfile";
|
2017-02-24 02:40:56 -06:00
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
//--- 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);
|
|
|
|
|
}
|
2023-05-08 21:18:23 -05:00
|
|
|
|
|
|
|
|
function SimViewTreeFilter::onReturn(%this)
|
|
|
|
|
{
|
|
|
|
|
%text = %this.getText();
|
|
|
|
|
if( %text $= "" )
|
|
|
|
|
%this.reset();
|
|
|
|
|
else
|
|
|
|
|
InspectTreeView.setFilterText( %text );
|
|
|
|
|
}
|