GuiEditor improvement: display SimID & ClassName of selected object
by Orion Elenzil · 02/07/2008 (2:56 pm) · 1 comments
This is based on a TGE 1.3.5 - based codebase, and honestly it might need some tweaking to match TG* 1.*,
or heck, it might even be already implented in those.
GuiEditorGui.gui
right after the control GuiEditorInspectName, add this:
there is a GuiScrollControl right after that,
move it's position from "0 24" to "0 35":
at the bottom of GuiEditorTreeView::onSelect(), add:
at the bottom of GuiEditor::onSelect(), add:
after the function GuiEditor::onSelect(), add:
or heck, it might even be already implented in those.
GuiEditorGui.gui
right after the control GuiEditorInspectName, add this:
new GuiControl (GuiEditorGeneralInfoContainer) {
position = "0 18";
extent = "140 16";
horizSizing = "width";
vertSizing = "bottom";
new GuiMLTextCtrl (GuiEditorGeneralInfoMLText) {
position = "4 3";
extent = "140 16";
horizSizing = "width";
vertSizing = "bottom";
text = "howdy!";
};
};there is a GuiScrollControl right after that,
move it's position from "0 24" to "0 35":
position = "0 35";
at the bottom of GuiEditorTreeView::onSelect(), add:
GuiEditor.updateGeneralInfo(%obj);
at the bottom of GuiEditor::onSelect(), add:
GuiEditor.updateGeneralInfo(%ctrl);
after the function GuiEditor::onSelect(), add:
function GuiEditor::updateGeneralInfo(%this, %ctrl)
{
%text = "<color:886644><linkcolor:775533><linkcolorhl:ddff00>";
%text = %text @ "<just:left>" @ "<a:gamelink COPYTOCLIP " @ %ctrl.getId () @ ">" @ %ctrl.getId () @ "</a>";
%text = %text @ " - " @ "<a:gamelink COPYTOCLIP " @ %ctrl.getClassName() @ ">" @ %ctrl.getClassName() @ "</a>";
GuiEditorGeneralInfoMLText.setText(%text);
}
function GuiEditorGeneralInfoMLText::onURL(%this, %url)
{
%cmd = getWord (%url, 1);
%restWords = getWords(%url, 2, 10000);
switch$ (%cmd)
{
case "COPYTOCLIP":
setClipboard(%restWords);
}
}About the author

Torque 3D Owner Novack
CyberianSoftware
Thanks Orion.
Edit: now I just have to remember myself to implement the resource...