Merge pull request #1458 from Areloch/FixSimView

Fixes for SimView window
This commit is contained in:
Brian Roberts 2025-05-15 20:29:26 -05:00 committed by GitHub
commit debcd31faa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,259 +1,168 @@
//--- OBJECT WRITE BEGIN --- //--- OBJECT WRITE BEGIN ---
$guiContent = new GuiControl(simViewDlg, EditorGuiGroup) { $guiContent = new GuiControl(simViewDlg,EditorGuiGroup) {
canSaveDynamicFields = "0"; extent = "1280 720";
Profile = "ToolsGuiDefaultProfile"; minExtent = "8 8";
HorizSizing = "right"; profile = "ToolsGuiDefaultProfile";
VertSizing = "bottom"; tooltipProfile = "GuiToolTipProfile";
position = "0 0"; isContainer = "1";
Extent = "800 600"; canSaveDynamicFields = "1";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
new GuiWindowCtrl() { new GuiWindowCtrl() {
canSaveDynamicFields = "0";
Profile = "ToolsGuiWindowProfile";
HorizSizing = "center";
VertSizing = "center";
position = "70 43";
Extent = "685 489";
MinExtent = "602 440";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "Torque SimView"; text = "Torque SimView";
maxLength = "1024";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
closeCommand = "Canvas.popDialog(simViewDlg);"; closeCommand = "Canvas.popDialog(simViewDlg);";
position = "297 115";
extent = "685 489";
minExtent = "602 440";
horizSizing = "center";
vertSizing = "center";
profile = "ToolsGuiWindowProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiScrollCtrl() { new GuiControl() {
canSaveDynamicFields = "0"; position = "10 27";
Profile = "ToolsGuiScrollProfile"; extent = "260 20";
HorizSizing = "width"; horizSizing = "width";
VertSizing = "height"; profile = "GuiDefaultProfile";
position = "10 28"; tooltipProfile = "GuiToolTipProfile";
Extent = "255 448"; isContainer = "1";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "alwaysOn";
lockHorizScroll = "false";
lockVertScroll = "false";
constantThumbHeight = "0";
childMargin = "0 0";
new GuiTreeViewCtrl(InspectTreeView) { new GuiTextEditCtrl(SimViewTreeFilter) {
canSaveDynamicFields = "0"; placeholderText = "Filter...";
Profile = "ToolsGuiTreeViewProfile"; position = "-3 0";
HorizSizing = "right"; extent = "260 20";
VertSizing = "bottom"; minExtent = "8 8";
position = "2 2"; horizSizing = "width";
Extent = "212 21"; profile = "ToolsGuiTextEditProfile";
MinExtent = "8 8"; tooltipProfile = "GuiToolTipProfile";
canSave = "1"; };
Visible = "1"; new GuiBitmapButtonCtrl(SimViewTreeFilterClearBtn) {
hovertime = "1000"; BitmapAsset = "ToolsModule:clear_icon_n_image";
tabSize = "16"; position = "239 2";
textOffset = "2"; extent = "17 17";
fullRowSelect = "0"; horizSizing = "left";
itemHeight = "21"; profile = "ToolsGuiDefaultProfile";
destroyTreeOnSleep = "1"; tooltipProfile = "ToolsGuiToolTipProfile";
MouseDragging = "1"; };
MultipleSelections = "1"; };
DeleteObjectAllowed = "1"; new GuiScrollCtrl() {
DragToItemAllowed = "1"; 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() { new GuiScrollCtrl() {
canSaveDynamicFields = "0";
Profile = "ToolsGuiScrollProfile";
HorizSizing = "left";
VertSizing = "height";
position = "272 96";
Extent = "404 380";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
willFirstRespond = "1";
hScrollBar = "alwaysOff"; hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn"; lockHorizScroll = "1";
lockHorizScroll = "true"; position = "272 96";
lockVertScroll = "false"; extent = "404 380";
constantThumbHeight = "0"; minExtent = "8 8";
childMargin = "0 0"; horizSizing = "left";
vertSizing = "height";
profile = "ToolsGuiScrollProfile";
tooltipProfile = "GuiToolTipProfile";
new GuiInspector(InspectFields) { new GuiInspector(InspectFields) {
StackingType = "Vertical"; position = "1 1";
HorizStacking = "Left to Right"; extent = "389 8";
VertStacking = "Top to Bottom"; minExtent = "8 8";
Padding = "1"; horizSizing = "width";
canSaveDynamicFields = "0"; profile = "ToolsGuiTransparentProfile";
Profile = "ToolsGuiTransparentProfile"; tooltipProfile = "GuiToolTipProfile";
HorizSizing = "width";
VertSizing = "bottom";
position = "2 2";
Extent = "382 8";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
}; };
}; };
new GuiControl() { new GuiControl() {
canSaveDynamicFields = "0";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "left";
VertSizing = "bottom";
position = "272 28"; position = "272 28";
Extent = "403 61"; extent = "403 61";
MinExtent = "8 2"; horizSizing = "left";
canSave = "1"; profile = "ToolsGuiButtonProfile";
Visible = "1"; tooltipProfile = "GuiToolTipProfile";
hovertime = "1000"; isContainer = "1";
new GuiTextEditCtrl(InspectObjectName) {
canSaveDynamicFields = "0";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "121 8";
Extent = "195 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "1024";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
};
new GuiTextCtrl() { new GuiTextCtrl() {
canSaveDynamicFields = "0";
Profile = "EditorTextHLRight";
HorizSizing = "right";
VertSizing = "bottom";
VertSizing = "bottom";
Extent = "44 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "Sim ID:";
maxLength = "1024";
};
new GuiTextCtrl() {
canSaveDynamicFields = "0";
Profile = "EditorTextHLRight";
HorizSizing = "right";
VertSizing = "bottom";
HorizSizing = "right";
Extent = "106 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "Internal Name:";
maxLength = "1024";
};
new GuiTextEditCtrl(InspectObjectInternalName) {
canSaveDynamicFields = "0";
Profile = "ToolsGuiTextEditProfile";
HorizSizing = "right";
VertSizing = "bottom";
Extent = "93 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
maxLength = "1024";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
password = "0";
passwordMask = "*";
canSaveDynamicFields = "0";
};
new GuiTextCtrl() {
Profile = "EditorTextHLBoldRight";
HorizSizing = "right";
VertSizing = "bottom";
HorizSizing = "right";
Extent = "106 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "Selected Object:"; text = "Selected Object:";
maxLength = "1024"; extent = "106 18";
minExtent = "8 8";
profile = "ToolsGuiTextProfile";
tooltipProfile = "GuiToolTipProfile";
}; };
new GuiIconButtonCtrl() { new GuiTextEditCtrl(InspectObjectName) {
canSaveDynamicFields = "0"; position = "121 2";
Profile = "ToolsGuiButtonProfile"; extent = "195 20";
HorizSizing = "right"; minExtent = "8 8";
VertSizing = "bottom"; profile = "ToolsGuiTextEditProfile";
Extent = "76 22"; tooltipProfile = "GuiToolTipProfile";
MinExtent = "8 2"; };
canSave = "1"; new GuiTextCtrl() {
Visible = "1"; text = "Sim ID:";
Command = "InspectApply();"; position = "0 22";
hovertime = "1000"; extent = "44 18";
text = "Refresh"; minExtent = "8 8";
groupNum = "-1"; vertSizing = "center";
buttonType = "PushButton"; profile = "ToolsGuiTextProfile";
bitmapAsset = "ToolsModule:iconRefresh_image"; tooltipProfile = "GuiToolTipProfile";
sizeIconToButton = "0";
textLocation = "Right";
textMargin = "4";
buttonMargin = "4 4";
}; };
new GuiTextCtrl(InspectObjectSimID) { new GuiTextCtrl(InspectObjectSimID) {
canSaveDynamicFields = "0";
Profile = "EditorTextHLBoldCenter";
HorizSizing = "right";
VertSizing = "bottom";
HorizSizing = "right";
Extent = "51 18";
MinExtent = "8 8";
canSave = "1";
Visible = "1";
hovertime = "1000";
text = "0"; text = "0";
maxLength = "1024"; 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() { new GuiIconButtonCtrl() {
canSaveDynamicFields = "0"; BitmapAsset = "ToolsModule:iconDelete_image";
Profile = "ToolsGuiButtonProfile";
HorizSizing = "right";
VertSizing = "bottom";
Extent = "76 22";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
Command = "InspectDelete();";
hovertime = "1000";
text = "Delete";
groupNum = "-1";
buttonType = "PushButton";
bitmapAsset = "ToolsModule:iconDelete_image";
sizeIconToButton = "0";
textLocation = "Right"; textLocation = "Right";
textMargin = "4"; text = "Delete";
buttonMargin = "4 4"; 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";
}; };
}; };
}; };
@ -307,11 +216,8 @@ function InspectDelete()
InspectObjectName.setValue(""); InspectObjectName.setValue("");
InspectObjectInternalName.setValue( "" ); InspectObjectInternalName.setValue( "" );
InspectObjectSimID.setValue( 0 ); InspectObjectSimID.setValue( 0 );
} }
function InspectTreeView::onSelect(%this, %obj) function InspectTreeView::onSelect(%this, %obj)
{ {
Inspect(%obj); Inspect(%obj);
@ -346,10 +252,12 @@ function GuiInspector::setAllGroupStateScript(%this, %obj, %groupState)
function SimViewTreeFilter::onReturn(%this) function SimViewTreeFilter::onReturn(%this)
{ {
%text = %this.getText(); InspectTreeView.setFilterText( %this.getText() );
if( %text $= "" )
%this.reset();
else
InspectTreeView.setFilterText( %text );
} }
function SimViewTreeFilterClearBtn::onClick(%this)
{
SimViewTreeFilter.setText("");
InspectTreeView.setFilterText("");
}