Torque3D/Templates/BaseGame/game/tools/gui/simViewDlg.ed.gui

264 lines
7.5 KiB
Plaintext

//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiControl(simViewDlg,EditorGuiGroup) {
extent = "1280 720";
minExtent = "8 8";
profile = "ToolsGuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
canSaveDynamicFields = "1";
new GuiWindowCtrl() {
text = "Torque SimView";
closeCommand = "Canvas.popDialog(simViewDlg);";
position = "297 115";
extent = "685 489";
minExtent = "602 440";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiControl() {
position = "10 27";
extent = "260 20";
horizSizing = "width";
profile = "GuiDefaultProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
new GuiTextEditCtrl(SimViewTreeFilter) {
placeholderText = "Filter...";
position = "-3 0";
extent = "260 20";
minExtent = "8 8";
horizSizing = "width";
profile = "ToolsGuiTextEditProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiBitmapButtonCtrl(SimViewTreeFilterClearBtn) {
BitmapAsset = "ToolsModule:clear_icon_n_image";
position = "239 2";
extent = "17 17";
horizSizing = "left";
profile = "ToolsGuiDefaultProfile";
tooltipProfile = "ToolsGuiToolTipProfile";
};
};
new GuiScrollCtrl() {
hScrollBar = "dynamic";
position = "10 56";
extent = "255 420";
minExtent = "8 8";
horizSizing = "width";
vertSizing = "height";
profile = "ToolsGuiScrollProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiTreeViewCtrl(InspectTreeView) {
itemHeight = "21";
position = "1 1";
extent = "239 21";
minExtent = "8 8";
horizSizing = "width";
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 GuiControl() {
position = "272 28";
extent = "403 61";
horizSizing = "left";
profile = "ToolsGuiButtonProfile";
tooltipProfile = "GuiToolTipProfile";
isContainer = "1";
new GuiTextCtrl() {
text = "Selected Object:";
extent = "106 18";
minExtent = "8 8";
profile = "ToolsGuiTextProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextEditCtrl(InspectObjectName) {
position = "121 2";
extent = "195 20";
minExtent = "8 8";
profile = "ToolsGuiTextEditProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextCtrl() {
text = "Sim ID:";
position = "0 22";
extent = "44 18";
minExtent = "8 8";
vertSizing = "center";
profile = "ToolsGuiTextProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextCtrl(InspectObjectSimID) {
text = "0";
position = "122 22";
extent = "51 18";
minExtent = "8 8";
vertSizing = "center";
profile = "ToolsGuiTextProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextCtrl() {
text = "Internal Name:";
position = "0 40";
extent = "106 18";
minExtent = "8 8";
vertSizing = "top";
profile = "ToolsGuiTextProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiTextEditCtrl(InspectObjectInternalName) {
position = "122 40";
extent = "196 20";
minExtent = "8 8";
vertSizing = "top";
profile = "ToolsGuiTextEditProfile";
tooltipProfile = "GuiToolTipProfile";
};
new GuiIconButtonCtrl() {
BitmapAsset = "ToolsModule:iconDelete_image";
textLocation = "Right";
text = "Delete";
position = "328 0";
extent = "76 22";
horizSizing = "left";
profile = "ToolsGuiButtonProfile";
command = "InspectDelete();";
tooltipProfile = "GuiToolTipProfile";
};
new GuiIconButtonCtrl() {
BitmapAsset = "ToolsModule:iconRefresh_image";
textLocation = "Right";
text = "Refresh";
position = "328 40";
extent = "76 22";
horizSizing = "left";
vertSizing = "top";
profile = "ToolsGuiButtonProfile";
command = "InspectApply();";
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)
{
InspectTreeView.setFilterText( %this.getText() );
}
function SimViewTreeFilterClearBtn::onClick(%this)
{
SimViewTreeFilter.setText("");
InspectTreeView.setFilterText("");
}