mirror of
https://github.com/exogen/t2-mapper.git
synced 2026-07-11 06:24:47 +00:00
Initial commit
This commit is contained in:
parent
2211ed7650
commit
ebb3dc9cdd
10121 changed files with 801 additions and 4 deletions
108
docs/base/@vl2/scripts.vl2/gui/EditorToolTreeViewGui.gui
Normal file
108
docs/base/@vl2/scripts.vl2/gui/EditorToolTreeViewGui.gui
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
|
||||
new GuiScrollCtrl(EditorToolTreeViewGui)
|
||||
{
|
||||
profile = "GuiScrollCtrlProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
vScrollBar = "alwaysOn";
|
||||
hScrollBar = "dynamic";
|
||||
position = "0 0";
|
||||
extent = "200 400";
|
||||
|
||||
new GuiScrollContentCtrl()
|
||||
{
|
||||
profile = "GuiScrollContentProfile";
|
||||
|
||||
// new GuiTreeViewCtrl(EditorTree)
|
||||
new GuiTreeView(EditorTree)
|
||||
{
|
||||
profile = "GuiTreeViewProfile";
|
||||
position = "0 0";
|
||||
extent = "300 300";
|
||||
horizSizing = "width";
|
||||
allowMultipleSelections = "true";
|
||||
recurseSets = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Functions
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
function EditorTree::init(%this)
|
||||
{
|
||||
%this.open(MissionGroup);
|
||||
|
||||
// context menu
|
||||
new GuiControl(ETContextPopupDlg)
|
||||
{
|
||||
profile = "GuiModelessDialogProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
|
||||
new GuiPopUpMenuCtrl(ETContextPopup)
|
||||
{
|
||||
profile = "GuiButtonProfile";
|
||||
position = "0 0";
|
||||
extent = "0 0";
|
||||
minExtent = "0 0";
|
||||
maxPopupHeight = "200";
|
||||
command = "canvas.popDialog(ETContextPopupDlg);";
|
||||
};
|
||||
};
|
||||
ETContextPopup.setVisible(false);
|
||||
}
|
||||
|
||||
function EditorTree::onInspect(%this, %obj)
|
||||
{
|
||||
Inspector.inspect(%obj);
|
||||
InspectorNameEdit.setValue(%obj.getName());
|
||||
}
|
||||
|
||||
function EditorTree::onSelect(%this, %obj)
|
||||
{
|
||||
if($AIEdit)
|
||||
aiEdit.selectObject(%obj);
|
||||
else
|
||||
wEditor.selectObject(%obj);
|
||||
|
||||
}
|
||||
|
||||
function EditorTree::onUnselect(%this, %obj)
|
||||
{
|
||||
if($AIEdit)
|
||||
aiEdit.unselectObject(%obj);
|
||||
else
|
||||
wEditor.unselectObject(%obj);
|
||||
}
|
||||
|
||||
function EditorTree::onContextMenu(%this, %mousePos, %obj)
|
||||
{
|
||||
ETContextPopup.position = %mousePos;
|
||||
ETContextPopup.clear();
|
||||
ETContextPopup.add("Delete", 0);
|
||||
|
||||
canvas.pushDialog(ETContextPopupDlg);
|
||||
ETContextPopup.forceOnAction();
|
||||
|
||||
%this.contextObj = %obj;
|
||||
}
|
||||
|
||||
function ETContextPopup::onSelect(%this, %index, %value)
|
||||
{
|
||||
switch(%index)
|
||||
{
|
||||
case 0:
|
||||
EditorTree.contextObj.delete();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue