mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-12 23:24:41 +00:00
Merge pull request #698 from Areloch/RemoveLibraryTabsFromEditors
Removes the Library tabs from the World and GUI editors to avoid confusion
This commit is contained in:
commit
ce1fbe5f2c
17 changed files with 83 additions and 480 deletions
|
|
@ -136,7 +136,7 @@ function VPathTreeView::DeleteSelectedPaths( %this )
|
||||||
function VPathTreeView::CreatePath( %this )
|
function VPathTreeView::CreatePath( %this )
|
||||||
{
|
{
|
||||||
// Create Path Object.
|
// Create Path Object.
|
||||||
EWCreatorWindow.createObject( "ObjectBuilderGui.buildObject( \"VPath\" );" );
|
ObjectCreator.createObject( "ObjectBuilderGui.buildObject( \"VPath\" );" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,7 @@ function VPathEditorPlugin::onWorldEditorStartup( %this )
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
||||||
EWCreatorWindow.registerMissionObject( "VPath", "VPath", "", "Level" );
|
ObjectCreator.registerMissionObject( "VPath", "VPath", "", "Level" );
|
||||||
}
|
}
|
||||||
|
|
||||||
//EditorGui.setEditor(\"VPathEditorPlugin\");
|
//EditorGui.setEditor(\"VPathEditorPlugin\");
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,9 @@ function AssetBrowser::initialize(%this)
|
||||||
if(!isObject(AssetPreviewArray))
|
if(!isObject(AssetPreviewArray))
|
||||||
new ArrayObject(AssetPreviewArray);
|
new ArrayObject(AssetPreviewArray);
|
||||||
|
|
||||||
|
if(!isObject(ObjectCreator))
|
||||||
|
new ScriptObject(ObjectCreator);
|
||||||
|
|
||||||
if(!isObject(%this.dirHandler))
|
if(!isObject(%this.dirHandler))
|
||||||
{
|
{
|
||||||
%this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
|
%this.dirHandler = makedirectoryHandler(AssetBrowser-->filterTree, "cache,shaderCache", "");
|
||||||
|
|
@ -2301,7 +2304,7 @@ function EWorldEditor::onControlDropped( %this, %payload, %position )
|
||||||
|
|
||||||
%assetType = %payload.assetType;
|
%assetType = %payload.assetType;
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||||
%module = %payload.moduleName;
|
%module = %payload.moduleName;
|
||||||
%asset = %payload.assetName;
|
%asset = %payload.assetName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ function AssetBrowser::onCreatorEditorDropped(%this, %assetDef, %position)
|
||||||
%camPos = LocalClientConnection.camera.getPosition();
|
%camPos = LocalClientConnection.camera.getPosition();
|
||||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
%pos = ObjectCreator.getCreateObjectPosition();
|
||||||
|
|
||||||
if(%rayResult != 0)
|
if(%rayResult != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -88,7 +88,7 @@ function spawnDatablockObject(%datablock)
|
||||||
%cmd = %class @ "::create(" @ %name @ ");";
|
%cmd = %class @ "::create(" @ %name @ ");";
|
||||||
|
|
||||||
%shapePath = ( %datablock.shapeAsset !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
%shapePath = ( %datablock.shapeAsset !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
||||||
%createCmd = "EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
%createCmd = "ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||||
return eval(%createCmd);//eval("showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );");
|
return eval(%createCmd);//eval("showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -171,7 +171,7 @@ function AssetBrowser::onDatablockEditorDropped(%this, %assetDef, %position)
|
||||||
%camPos = LocalClientConnection.camera.getPosition();
|
%camPos = LocalClientConnection.camera.getPosition();
|
||||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
%pos = ObjectCreator.getCreateObjectPosition();
|
||||||
|
|
||||||
if(%rayResult != 0)
|
if(%rayResult != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ function AssetBrowser::dragAndDropGameObjectAsset(%this, %assetDef, %dropTarget)
|
||||||
|
|
||||||
getScene(0).add(%gameObject);
|
getScene(0).add(%gameObject);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
%pos = ObjectCreator.getCreateObjectPosition(); //LocalClientConnection.camera.position;
|
||||||
|
|
||||||
%gameObject.position = %pos;
|
%gameObject.position = %pos;
|
||||||
|
|
||||||
|
|
@ -131,7 +131,7 @@ function AssetBrowser::onGameObjectAssetEditorDropped(%this, %assetDef, %positio
|
||||||
%camPos = LocalClientConnection.camera.getPosition();
|
%camPos = LocalClientConnection.camera.getPosition();
|
||||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
%pos = ObjectCreator.getCreateObjectPosition();
|
||||||
|
|
||||||
if(%rayResult != 0)
|
if(%rayResult != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ function AssetBrowser::onPrefabEditorDropped(%this, %assetDef, %position)
|
||||||
%camPos = LocalClientConnection.camera.getPosition();
|
%camPos = LocalClientConnection.camera.getPosition();
|
||||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
%pos = ObjectCreator.getCreateObjectPosition();
|
||||||
|
|
||||||
if(%rayResult != 0)
|
if(%rayResult != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ function AssetBrowser::onSoundAssetEditorDropped(%this, %assetDef, %position)
|
||||||
%camPos = LocalClientConnection.camera.getPosition();
|
%camPos = LocalClientConnection.camera.getPosition();
|
||||||
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
%rayResult = containerRayCast(%camPos, %targetPosition, -1);
|
||||||
|
|
||||||
%pos = EWCreatorWindow.getCreateObjectPosition();
|
%pos = ObjectCreator.getCreateObjectPosition();
|
||||||
|
|
||||||
if(%rayResult != 0)
|
if(%rayResult != 0)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ function AssetBrowser::addCreatorClass(%this, %class, %name, %buildfunc)
|
||||||
else
|
else
|
||||||
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
||||||
|
|
||||||
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
%buildfunc = "ObjectBuilderGui.newObjectCallback = \"AssetBrowser.onFinishCreateObject\"; ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||||
}
|
}
|
||||||
|
|
||||||
%args = new ScriptObject();
|
%args = new ScriptObject();
|
||||||
|
|
|
||||||
|
|
@ -1251,7 +1251,7 @@ function ColladaImportDlg::showDialog(%this, %shapePath, %cmd)
|
||||||
%this.cmd = %cmd;
|
%this.cmd = %cmd;
|
||||||
|
|
||||||
// Only allow loading lights if creating a new scene object
|
// Only allow loading lights if creating a new scene object
|
||||||
%canLoadLights = (strstr(%this.cmd, "EWCreatorWindow.create") != -1);
|
%canLoadLights = (strstr(%this.cmd, "ObjectCreator.create") != -1);
|
||||||
|
|
||||||
// Check for an existing TSShapeConstructor object. Need to exec the script
|
// Check for an existing TSShapeConstructor object. Need to exec the script
|
||||||
// manually as the DAE resource may not have been loaded yet
|
// manually as the DAE resource may not have been loaded yet
|
||||||
|
|
|
||||||
|
|
@ -1010,76 +1010,6 @@ $guiContent = new GuiControl(GuiEditorGui, EditorGuiGroup) {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
new GuiTabPageCtrl() {
|
|
||||||
fitBook = "1";
|
|
||||||
text = "Library";
|
|
||||||
maxLength = "1024";
|
|
||||||
docking = "client";
|
|
||||||
Margin = "-1 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabPageProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
position = "0 20";
|
|
||||||
Extent = "223 734";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "0";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
internalName = "toolboxPage";
|
|
||||||
|
|
||||||
new GuiScrollCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiScrollProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
position = "0 0";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
hovertime = "1000";
|
|
||||||
willFirstRespond = "1";
|
|
||||||
hScrollBar = "alwaysOff";
|
|
||||||
vScrollBar = "dynamic";
|
|
||||||
lockHorizScroll = "true";
|
|
||||||
lockVertScroll = "false";
|
|
||||||
constantThumbHeight = "0";
|
|
||||||
childMargin = "0 0";
|
|
||||||
docking = "client";
|
|
||||||
|
|
||||||
new GuiStackControl(GuiEditorToolbox) {
|
|
||||||
StackingType = "Vertical";
|
|
||||||
HorizStacking = "Left to Right";
|
|
||||||
VertStacking = "Top to Bottom";
|
|
||||||
Padding = "2";
|
|
||||||
DynamicSize = "1";
|
|
||||||
ChangeChildSizeToFit = "1";
|
|
||||||
ChangeChildPosition = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiDefaultProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
position = "3 3";
|
|
||||||
Extent = "419 10008";
|
|
||||||
MinExtent = "16 16";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
new GuiTabPageCtrl() {
|
new GuiTabPageCtrl() {
|
||||||
fitBook = "1";
|
fitBook = "1";
|
||||||
text = "Profiles";
|
text = "Profiles";
|
||||||
|
|
|
||||||
|
|
@ -1023,11 +1023,6 @@ function GuiEditorGui::onWake( %this )
|
||||||
|
|
||||||
%this.initSettings();
|
%this.initSettings();
|
||||||
%this.readSettings();
|
%this.readSettings();
|
||||||
|
|
||||||
// Initialize toolbox.
|
|
||||||
|
|
||||||
if( !GuiEditorToolbox.isInitialized )
|
|
||||||
GuiEditorToolbox.initialize();
|
|
||||||
|
|
||||||
// Set up initial menu toggle states.
|
// Set up initial menu toggle states.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,13 +91,13 @@ function NavEditorPlugin::onWorldEditorStartup(%this)
|
||||||
ENavEditorSettingsPage.init();
|
ENavEditorSettingsPage.init();
|
||||||
|
|
||||||
// Add items to World Editor Creator
|
// Add items to World Editor Creator
|
||||||
EWCreatorWindow.beginGroup("Navigation");
|
ObjectCreator.beginGroup("Navigation");
|
||||||
|
|
||||||
EWCreatorWindow.registerMissionObject("CoverPoint", "Cover point");
|
ObjectCreator.registerMissionObject("CoverPoint", "Cover point");
|
||||||
EWCreatorWindow.registerMissionObject("NavPath", "Nav Path");
|
ObjectCreator.registerMissionObject("NavPath", "Nav Path");
|
||||||
EWCreatorWindow.registerMissionObject("NavMesh", "Navigation mesh");
|
ObjectCreator.registerMissionObject("NavMesh", "Navigation mesh");
|
||||||
|
|
||||||
EWCreatorWindow.endGroup();
|
ObjectCreator.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
function ENavEditorSettingsPage::init(%this)
|
function ENavEditorSettingsPage::init(%this)
|
||||||
|
|
|
||||||
|
|
@ -176,331 +176,6 @@ $guiContent = new GuiControl() {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
new GuiTabPageCtrl(EWCreatorWindow) {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
internalName = "CreatorWindow";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiEditorTabPage";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
position = "0 19";
|
|
||||||
Extent = "208 274";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Library";
|
|
||||||
maxLength = "1024";
|
|
||||||
|
|
||||||
new GuiControl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "GuiInspectorProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
position = "0 0";
|
|
||||||
Extent = "198 271";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "0";
|
|
||||||
Visible = "1";
|
|
||||||
};
|
|
||||||
new GuiBitmapBorderCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "ToolsGuiTabBorderProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
position = "5 5";
|
|
||||||
Extent = "198 271";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "0";
|
|
||||||
Visible = "1";
|
|
||||||
hovertime = "1000";
|
|
||||||
};
|
|
||||||
new GuiBitmapBorderCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "ToolsGuiTabBorderProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
position = "0 25";
|
|
||||||
Extent = "198 246";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "0";
|
|
||||||
Visible = "1";
|
|
||||||
hovertime = "1000";
|
|
||||||
};
|
|
||||||
new GuiContainer() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "ToolsGuiTransparentProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "-4 47";
|
|
||||||
Extent = "206 228";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
|
|
||||||
new GuiScrollCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "EditorLightScrollProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
Position = "4 4";
|
|
||||||
Extent = "198 220";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
profile = "ToolsGuiScrollProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Docking = "Client";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
willFirstRespond = "1";
|
|
||||||
hScrollBar = "dynamic";
|
|
||||||
vScrollBar = "alwaysOff";
|
|
||||||
lockHorizScroll = "false";
|
|
||||||
lockVertScroll = "true";
|
|
||||||
constantThumbHeight = "0";
|
|
||||||
childMargin = "0 6";
|
|
||||||
|
|
||||||
new GuiDynamicCtrlArrayControl(CreatorIconArray) {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTransparentProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "1 1";
|
|
||||||
Extent = "197 218";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
colCount = "20";
|
|
||||||
colSize = "64";
|
|
||||||
rowCount = "0";
|
|
||||||
RowSize = "32";
|
|
||||||
rowSpacing = "4";
|
|
||||||
colSpacing = "4";
|
|
||||||
frozen = "0";
|
|
||||||
autoCellSize = "1";
|
|
||||||
fillRowFirst = "0";
|
|
||||||
dynamicSize = "1";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
new GuiControl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiDefaultProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
Position = "-3 2";
|
|
||||||
Extent = "202 55";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
|
|
||||||
new GuiBitmapButtonCtrl(CreatorNavUpButton) {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "ToolsGuiButtonProfile";
|
|
||||||
HorizSizing = "right";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
Position = "9 28";
|
|
||||||
Extent = "20 19";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
Command = "EWCreatorWindow.navigateUp();";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
groupNum = "0";
|
|
||||||
buttonType = "PushButton";
|
|
||||||
|
|
||||||
Bitmap = "ToolsModule:folderUp_image";
|
|
||||||
autoSize = "0";
|
|
||||||
};
|
|
||||||
new GuiPopUpMenuCtrl(CreatorPopupMenu) {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "0";
|
|
||||||
Profile = "ToolsGuiPopUpMenuProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
Position = "32 28";
|
|
||||||
Extent = "163 18";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Objects";
|
|
||||||
maxLength = "1024";
|
|
||||||
maxPopupHeight = "200";
|
|
||||||
sbUsesNAColor = "0";
|
|
||||||
reverseTextList = "0";
|
|
||||||
bitmapBounds = "16 16";
|
|
||||||
};
|
|
||||||
new GuiTabBookCtrl(CreatorTabBook) {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabBookProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "bottom";
|
|
||||||
Position = "0 4";
|
|
||||||
Extent = "201 25";
|
|
||||||
MinExtent = "8 2";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Docking = "None";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
TabPosition = "Top";
|
|
||||||
TabMargin = "0";
|
|
||||||
MinTabWidth = "49";
|
|
||||||
|
|
||||||
new GuiTabPageCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabPageProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "0 0";
|
|
||||||
Extent = "0 0";
|
|
||||||
MinExtent = "0 0";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "0";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Scripted";
|
|
||||||
maxLength = "1024";
|
|
||||||
};
|
|
||||||
new GuiTabPageCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabPageProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "0 0";
|
|
||||||
Extent = "0 0";
|
|
||||||
MinExtent = "0 0";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "0";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Meshes";
|
|
||||||
maxLength = "1024";
|
|
||||||
};
|
|
||||||
new GuiTabPageCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabPageProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "0 0";
|
|
||||||
Extent = "0 0";
|
|
||||||
MinExtent = "0 0";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Level";
|
|
||||||
maxLength = "1024";
|
|
||||||
};
|
|
||||||
new GuiTabPageCtrl() {
|
|
||||||
canSaveDynamicFields = "0";
|
|
||||||
Enabled = "1";
|
|
||||||
isContainer = "1";
|
|
||||||
Profile = "ToolsGuiTabPageProfile";
|
|
||||||
HorizSizing = "width";
|
|
||||||
VertSizing = "height";
|
|
||||||
Position = "0 0";
|
|
||||||
Extent = "0 0";
|
|
||||||
MinExtent = "0 0";
|
|
||||||
canSave = "1";
|
|
||||||
Visible = "1";
|
|
||||||
tooltipprofile = "ToolsGuiToolTipProfile";
|
|
||||||
hovertime = "1000";
|
|
||||||
Margin = "0 0 0 0";
|
|
||||||
Padding = "0 0 0 0";
|
|
||||||
AnchorTop = "1";
|
|
||||||
AnchorBottom = "0";
|
|
||||||
AnchorLeft = "1";
|
|
||||||
AnchorRight = "0";
|
|
||||||
text = "Prefabs";
|
|
||||||
maxLength = "1024";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
new GuiBitmapButtonCtrl() {
|
new GuiBitmapButtonCtrl() {
|
||||||
canSaveDynamicFields = "0";
|
canSaveDynamicFields = "0";
|
||||||
|
|
|
||||||
|
|
@ -973,7 +973,7 @@ function ObjectBuilderGui::processNewObject(%this, %obj)
|
||||||
if( %this.objectGroup !$= "" )
|
if( %this.objectGroup !$= "" )
|
||||||
%this.objectGroup.add( %obj );
|
%this.objectGroup.add( %obj );
|
||||||
else
|
else
|
||||||
EWCreatorWindow.objectGroup.add( %obj );
|
ObjectCreator.objectGroup.add( %obj );
|
||||||
|
|
||||||
// If we were given a callback to call after the
|
// If we were given a callback to call after the
|
||||||
// object has been created, do so now. Also clear
|
// object has been created, do so now. Also clear
|
||||||
|
|
@ -1148,9 +1148,9 @@ function ObjectBuilderGui::buildBasicClouds(%this)
|
||||||
|
|
||||||
function ObjectBuilderGui::checkExists( %this, %classname )
|
function ObjectBuilderGui::checkExists( %this, %classname )
|
||||||
{
|
{
|
||||||
for ( %i = 0; %i < EWCreatorWindow.objectGroup.getCount(); %i++ )
|
for ( %i = 0; %i < ObjectCreator.objectGroup.getCount(); %i++ )
|
||||||
{
|
{
|
||||||
%obj = EWCreatorWindow.objectGroup.getObject( %i );
|
%obj = ObjectCreator.objectGroup.getObject( %i );
|
||||||
if ( %obj.getClassName() $= %classname )
|
if ( %obj.getClassName() $= %classname )
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -1425,7 +1425,7 @@ function ObjectBuilderGui::buildPlayerDropPoint(%this)
|
||||||
%this.addField("spawnClass", "TypeString", "Spawn Class", "Player");
|
%this.addField("spawnClass", "TypeString", "Spawn Class", "Player");
|
||||||
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "PlayerData DefaultPlayerData");
|
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "PlayerData DefaultPlayerData");
|
||||||
|
|
||||||
if( EWCreatorWindow.objectGroup.getID() == getScene(0).getID() )
|
if( ObjectCreator.objectGroup.getID() == getScene(0).getID() )
|
||||||
{
|
{
|
||||||
if( !isObject("PlayerDropPoints") )
|
if( !isObject("PlayerDropPoints") )
|
||||||
getScene(0).add( new SimGroup("PlayerDropPoints") );
|
getScene(0).add( new SimGroup("PlayerDropPoints") );
|
||||||
|
|
@ -1445,7 +1445,7 @@ function ObjectBuilderGui::buildObserverDropPoint(%this)
|
||||||
%this.addField("spawnClass", "TypeString", "Spawn Class", "Camera");
|
%this.addField("spawnClass", "TypeString", "Spawn Class", "Camera");
|
||||||
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "CameraData Observer");
|
%this.addField("spawnDatablock", "TypeDataBlock", "Spawn Data", "CameraData Observer");
|
||||||
|
|
||||||
if( EWCreatorWindow.objectGroup.getID() == getScene(0).getID() )
|
if( ObjectCreator.objectGroup.getID() == getScene(0).getID() )
|
||||||
{
|
{
|
||||||
if( !isObject("ObserverDropPoints") )
|
if( !isObject("ObserverDropPoints") )
|
||||||
getScene(0).add( new SimGroup("ObserverDropPoints") );
|
getScene(0).add( new SimGroup("ObserverDropPoints") );
|
||||||
|
|
@ -1508,7 +1508,7 @@ function PhysicsEntityData::create(%data)
|
||||||
{
|
{
|
||||||
%obj = new PhysicsEntity() {
|
%obj = new PhysicsEntity() {
|
||||||
dataBlock = %data;
|
dataBlock = %data;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1517,7 +1517,7 @@ function StaticShapeData::create(%data)
|
||||||
{
|
{
|
||||||
%obj = new StaticShape() {
|
%obj = new StaticShape() {
|
||||||
dataBlock = %data;
|
dataBlock = %data;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1529,13 +1529,13 @@ function MissionMarkerData::create(%block)
|
||||||
case "WayPointMarker":
|
case "WayPointMarker":
|
||||||
%obj = new WayPoint() {
|
%obj = new WayPoint() {
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return(%obj);
|
return(%obj);
|
||||||
case "SpawnSphereMarker":
|
case "SpawnSphereMarker":
|
||||||
%obj = new SpawnSphere() {
|
%obj = new SpawnSphere() {
|
||||||
datablock = %block;
|
datablock = %block;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return(%obj);
|
return(%obj);
|
||||||
}
|
}
|
||||||
|
|
@ -1548,7 +1548,7 @@ function ItemData::create(%data)
|
||||||
%obj = new Item()
|
%obj = new Item()
|
||||||
{
|
{
|
||||||
dataBlock = %data;
|
dataBlock = %data;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
static = true;
|
static = true;
|
||||||
rotate = true;
|
rotate = true;
|
||||||
};
|
};
|
||||||
|
|
@ -1561,7 +1561,7 @@ function TurretShapeData::create(%block)
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
static = true;
|
static = true;
|
||||||
respawn = true;
|
respawn = true;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1572,7 +1572,7 @@ function AITurretShapeData::create(%block)
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
static = true;
|
static = true;
|
||||||
respawn = true;
|
respawn = true;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1581,7 +1581,7 @@ function WheeledVehicleData::create(%block)
|
||||||
{
|
{
|
||||||
%obj = new WheeledVehicle() {
|
%obj = new WheeledVehicle() {
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1591,7 +1591,7 @@ function FlyingVehicleData::create(%block)
|
||||||
%obj = new FlyingVehicle()
|
%obj = new FlyingVehicle()
|
||||||
{
|
{
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return(%obj);
|
return(%obj);
|
||||||
}
|
}
|
||||||
|
|
@ -1601,7 +1601,7 @@ function HoverVehicleData::create(%block)
|
||||||
%obj = new HoverVehicle()
|
%obj = new HoverVehicle()
|
||||||
{
|
{
|
||||||
dataBlock = %block;
|
dataBlock = %block;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return(%obj);
|
return(%obj);
|
||||||
}
|
}
|
||||||
|
|
@ -1610,7 +1610,7 @@ function RigidShapeData::create(%data)
|
||||||
{
|
{
|
||||||
%obj = new RigidShape() {
|
%obj = new RigidShape() {
|
||||||
dataBlock = %data;
|
dataBlock = %data;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1620,7 +1620,7 @@ function PhysicsShapeData::create( %datablock )
|
||||||
%obj = new PhysicsShape()
|
%obj = new PhysicsShape()
|
||||||
{
|
{
|
||||||
dataBlock = %datablock;
|
dataBlock = %datablock;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
|
|
||||||
invulnerable = false;
|
invulnerable = false;
|
||||||
damageRadius = 0;
|
damageRadius = 0;
|
||||||
|
|
@ -1637,7 +1637,7 @@ function ProximityMineData::create( %datablock )
|
||||||
%obj = new ProximityMine()
|
%obj = new ProximityMine()
|
||||||
{
|
{
|
||||||
dataBlock = %dataBlock;
|
dataBlock = %dataBlock;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
static = true; // mines created by the editor are static, and armed immediately
|
static = true; // mines created by the editor are static, and armed immediately
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1660,7 +1660,7 @@ function ParticleEmitterData::create( %datablock )
|
||||||
%obj = new ParticleEmitter()
|
%obj = new ParticleEmitter()
|
||||||
{
|
{
|
||||||
dataBlock = %datablock;
|
dataBlock = %datablock;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1670,7 +1670,7 @@ function PrecipitationData::create(%datablock)
|
||||||
%obj = new Precipitation()
|
%obj = new Precipitation()
|
||||||
{
|
{
|
||||||
dataBlock = %datablock;
|
dataBlock = %datablock;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
}
|
}
|
||||||
|
|
@ -1680,7 +1680,7 @@ function TriggerData::create(%datablock)
|
||||||
%obj = new Trigger()
|
%obj = new Trigger()
|
||||||
{
|
{
|
||||||
dataBlock = %datablock;
|
dataBlock = %datablock;
|
||||||
parentGroup = EWCreatorWindow.objectGroup;
|
parentGroup = ObjectCreator.objectGroup;
|
||||||
polyhedron = "-0.5 0.5 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0";
|
polyhedron = "-0.5 0.5 0.0 1.0 0.0 0.0 0.0 -1.0 0.0 0.0 0.0 1.0";
|
||||||
};
|
};
|
||||||
return %obj;
|
return %obj;
|
||||||
|
|
|
||||||
|
|
@ -216,7 +216,7 @@ function EditorGui::init(%this)
|
||||||
ETerrainEditor.init();
|
ETerrainEditor.init();
|
||||||
|
|
||||||
//Creator.init();
|
//Creator.init();
|
||||||
EWCreatorWindow.init();
|
ObjectCreator.init();
|
||||||
ObjectBuilderGui.init();
|
ObjectBuilderGui.init();
|
||||||
|
|
||||||
%this.setMenuDefaultState();
|
%this.setMenuDefaultState();
|
||||||
|
|
@ -873,7 +873,7 @@ function WorldEditorPlugin::onActivated( %this )
|
||||||
EditorGui.menuBar.insert( EditorGui.worldMenu, EditorGui.menuBar.dynamicItemInsertPos );
|
EditorGui.menuBar.insert( EditorGui.worldMenu, EditorGui.menuBar.dynamicItemInsertPos );
|
||||||
EWorldEditor.makeFirstResponder(true);
|
EWorldEditor.makeFirstResponder(true);
|
||||||
EditorTree.open($scenesRootGroup,true);
|
EditorTree.open($scenesRootGroup,true);
|
||||||
EWCreatorWindow.setNewObjectGroup(getScene(0));
|
ObjectCreator.setNewObjectGroup(getScene(0));
|
||||||
|
|
||||||
EditorTree.expandItem(1);
|
EditorTree.expandItem(1);
|
||||||
EditorTree.buildVisibleTree(true);
|
EditorTree.buildVisibleTree(true);
|
||||||
|
|
@ -1521,8 +1521,8 @@ function EditorTree::onDeleteObject( %this, %object )
|
||||||
if( %object.locked )
|
if( %object.locked )
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if( %object == EWCreatorWindow.objectGroup )
|
if( %object == ObjectCreator.objectGroup )
|
||||||
EWCreatorWindow.setNewObjectGroup( getScene(0) );
|
ObjectCreator.setNewObjectGroup( getScene(0) );
|
||||||
|
|
||||||
// Append it to our list.
|
// Append it to our list.
|
||||||
%this.undoDeleteList = %this.undoDeleteList TAB %object;
|
%this.undoDeleteList = %this.undoDeleteList TAB %object;
|
||||||
|
|
@ -1620,7 +1620,7 @@ function EditorTree::onDragDropped(%this)
|
||||||
|
|
||||||
function EditorTree::onAddGroupSelected(%this, %group)
|
function EditorTree::onAddGroupSelected(%this, %group)
|
||||||
{
|
{
|
||||||
EWCreatorWindow.setNewObjectGroup(%group);
|
ObjectCreator.setNewObjectGroup(%group);
|
||||||
}
|
}
|
||||||
|
|
||||||
function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
|
function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
|
||||||
|
|
@ -1706,7 +1706,7 @@ function EditorTree::onRightMouseUp( %this, %itemId, %mouse, %obj )
|
||||||
%popup.item[ 5 ] = "Toggle Hide Children" TAB "" TAB "EWorldEditor.toggleHideChildren( " @ %popup.object @ " );";
|
%popup.item[ 5 ] = "Toggle Hide Children" TAB "" TAB "EWorldEditor.toggleHideChildren( " @ %popup.object @ " );";
|
||||||
|
|
||||||
%popup.item[ 8 ] = "-";
|
%popup.item[ 8 ] = "-";
|
||||||
%popup.item[ 9 ] = "Add New Objects Here" TAB "" TAB "EWCreatorWindow.setNewObjectGroup( " @ %popup.object @ " );";
|
%popup.item[ 9 ] = "Add New Objects Here" TAB "" TAB "ObjectCreator.setNewObjectGroup( " @ %popup.object @ " );";
|
||||||
%popup.item[ 10 ] = "Add Children to Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", false );";
|
%popup.item[ 10 ] = "Add Children to Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", false );";
|
||||||
%popup.item[ 11 ] = "Remove Children from Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", true );";
|
%popup.item[ 11 ] = "Remove Children from Selection" TAB "" TAB "EWorldEditor.selectAllObjectsInSet( " @ %popup.object @ ", true );";
|
||||||
|
|
||||||
|
|
@ -2276,7 +2276,7 @@ function EWorldEditor::convertSelectionToConvexShape( %this )
|
||||||
|
|
||||||
function EWorldEditor::getNewObjectGroup( %this )
|
function EWorldEditor::getNewObjectGroup( %this )
|
||||||
{
|
{
|
||||||
return EWCreatorWindow.getNewObjectGroup();
|
return ObjectCreator.getNewObjectGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWorldEditor::deleteMissionObject( %this, %object )
|
function EWorldEditor::deleteMissionObject( %this, %object )
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
function EWCreatorWindow::init( %this )
|
function ObjectCreator::init( %this )
|
||||||
{
|
{
|
||||||
// Just so we can recall this method for testing changes
|
// Just so we can recall this method for testing changes
|
||||||
// without restarting.
|
// without restarting.
|
||||||
|
|
@ -113,23 +113,23 @@ function EWCreatorWindow::init( %this )
|
||||||
%this.endGroup();
|
%this.endGroup();
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::onWake( %this )
|
function ObjectCreator::onWake( %this )
|
||||||
{
|
{
|
||||||
CreatorTabBook.selectPage( 0 );
|
CreatorTabBook.selectPage( 0 );
|
||||||
CreatorTabBook.onTabSelected( "Scripted" );
|
CreatorTabBook.onTabSelected( "Scripted" );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::beginGroup( %this, %group )
|
function ObjectCreator::beginGroup( %this, %group )
|
||||||
{
|
{
|
||||||
%this.currentGroup = %group;
|
%this.currentGroup = %group;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::endGroup( %this, %group )
|
function ObjectCreator::endGroup( %this, %group )
|
||||||
{
|
{
|
||||||
%this.currentGroup = "";
|
%this.currentGroup = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::getCreateObjectPosition()
|
function ObjectCreator::getCreateObjectPosition()
|
||||||
{
|
{
|
||||||
%focusPoint = LocalClientConnection.getControlObject().getLookAtPoint();
|
%focusPoint = LocalClientConnection.getControlObject().getLookAtPoint();
|
||||||
if( %focusPoint $= "" )
|
if( %focusPoint $= "" )
|
||||||
|
|
@ -138,7 +138,7 @@ function EWCreatorWindow::getCreateObjectPosition()
|
||||||
return getWord( %focusPoint, 1 ) SPC getWord( %focusPoint, 2 ) SPC getWord( %focusPoint, 3 );
|
return getWord( %focusPoint, 1 ) SPC getWord( %focusPoint, 2 ) SPC getWord( %focusPoint, 3 );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::registerMissionObject( %this, %class, %name, %buildfunc, %group )
|
function ObjectCreator::registerMissionObject( %this, %class, %name, %buildfunc, %group )
|
||||||
{
|
{
|
||||||
if( !isClass(%class) )
|
if( !isClass(%class) )
|
||||||
return;
|
return;
|
||||||
|
|
@ -150,7 +150,7 @@ function EWCreatorWindow::registerMissionObject( %this, %class, %name, %buildfun
|
||||||
|
|
||||||
if ( %class $= "" || %group $= "" )
|
if ( %class $= "" || %group $= "" )
|
||||||
{
|
{
|
||||||
warn( "EWCreatorWindow::registerMissionObject, invalid parameters!" );
|
warn( "ObjectCreator::registerMissionObject, invalid parameters!" );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -162,12 +162,12 @@ function EWCreatorWindow::registerMissionObject( %this, %class, %name, %buildfun
|
||||||
%this.array.push_back( %group, %args );
|
%this.array.push_back( %group, %args );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::getNewObjectGroup( %this )
|
function ObjectCreator::getNewObjectGroup( %this )
|
||||||
{
|
{
|
||||||
return %this.objectGroup;
|
return %this.objectGroup;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::setNewObjectGroup( %this, %group )
|
function ObjectCreator::setNewObjectGroup( %this, %group )
|
||||||
{
|
{
|
||||||
if( %this.objectGroup )
|
if( %this.objectGroup )
|
||||||
{
|
{
|
||||||
|
|
@ -182,7 +182,7 @@ function EWCreatorWindow::setNewObjectGroup( %this, %group )
|
||||||
EditorTree.markItem( %itemId );
|
EditorTree.markItem( %itemId );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::createStatic( %this, %file )
|
function ObjectCreator::createStatic( %this, %file )
|
||||||
{
|
{
|
||||||
if ( !$missionRunning )
|
if ( !$missionRunning )
|
||||||
return;
|
return;
|
||||||
|
|
@ -200,7 +200,7 @@ function EWCreatorWindow::createStatic( %this, %file )
|
||||||
%this.onObjectCreated( %objId );
|
%this.onObjectCreated( %objId );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::createPrefab( %this, %file )
|
function ObjectCreator::createPrefab( %this, %file )
|
||||||
{
|
{
|
||||||
if ( !$missionRunning )
|
if ( !$missionRunning )
|
||||||
return;
|
return;
|
||||||
|
|
@ -218,7 +218,7 @@ function EWCreatorWindow::createPrefab( %this, %file )
|
||||||
%this.onObjectCreated( %objId );
|
%this.onObjectCreated( %objId );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::createObject( %this, %cmd )
|
function ObjectCreator::createObject( %this, %cmd )
|
||||||
{
|
{
|
||||||
if ( !$missionRunning )
|
if ( !$missionRunning )
|
||||||
return;
|
return;
|
||||||
|
|
@ -236,7 +236,7 @@ function EWCreatorWindow::createObject( %this, %cmd )
|
||||||
return %objId;
|
return %objId;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::onFinishCreateObject( %this, %objId )
|
function ObjectCreator::onFinishCreateObject( %this, %objId )
|
||||||
{
|
{
|
||||||
%this.objectGroup.add( %objId );
|
%this.objectGroup.add( %objId );
|
||||||
|
|
||||||
|
|
@ -251,7 +251,7 @@ function EWCreatorWindow::onFinishCreateObject( %this, %objId )
|
||||||
%this.onObjectCreated( %objId );
|
%this.onObjectCreated( %objId );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::onObjectCreated( %this, %objId )
|
function ObjectCreator::onObjectCreated( %this, %objId )
|
||||||
{
|
{
|
||||||
// Can we submit an undo action?
|
// Can we submit an undo action?
|
||||||
if ( isObject( %objId ) )
|
if ( isObject( %objId ) )
|
||||||
|
|
@ -270,12 +270,12 @@ function CreatorTabBook::onTabSelected( %this, %text, %idx )
|
||||||
{
|
{
|
||||||
if ( %this.isAwake() )
|
if ( %this.isAwake() )
|
||||||
{
|
{
|
||||||
EWCreatorWindow.tab = %text;
|
ObjectCreator.tab = %text;
|
||||||
EWCreatorWindow.navigate( "" );
|
ObjectCreator.navigate( "" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::navigate( %this, %address )
|
function ObjectCreator::navigate( %this, %address )
|
||||||
{
|
{
|
||||||
CreatorIconArray.frozen = true;
|
CreatorIconArray.frozen = true;
|
||||||
CreatorIconArray.clear();
|
CreatorIconArray.clear();
|
||||||
|
|
@ -535,7 +535,7 @@ function EWCreatorWindow::navigate( %this, %address )
|
||||||
CreatorPopupMenu.tooltip = %str;
|
CreatorPopupMenu.tooltip = %str;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::navigateDown( %this, %folder )
|
function ObjectCreator::navigateDown( %this, %folder )
|
||||||
{
|
{
|
||||||
if ( %this.address $= "" )
|
if ( %this.address $= "" )
|
||||||
%address = %folder;
|
%address = %folder;
|
||||||
|
|
@ -548,7 +548,7 @@ function EWCreatorWindow::navigateDown( %this, %folder )
|
||||||
%this.schedule( 1, "navigate", %address );
|
%this.schedule( 1, "navigate", %address );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::navigateUp( %this )
|
function ObjectCreator::navigateUp( %this )
|
||||||
{
|
{
|
||||||
%count = getWordCount( %this.address );
|
%count = getWordCount( %this.address );
|
||||||
|
|
||||||
|
|
@ -563,7 +563,7 @@ function EWCreatorWindow::navigateUp( %this )
|
||||||
%this.navigate( %address );
|
%this.navigate( %address );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::setListView( %this, %noupdate )
|
function ObjectCreator::setListView( %this, %noupdate )
|
||||||
{
|
{
|
||||||
//CreatorIconArray.clear();
|
//CreatorIconArray.clear();
|
||||||
//CreatorIconArray.setVisible( false );
|
//CreatorIconArray.setVisible( false );
|
||||||
|
|
@ -576,7 +576,7 @@ function EWCreatorWindow::setListView( %this, %noupdate )
|
||||||
%this.navigate( %this.address );
|
%this.navigate( %this.address );
|
||||||
}
|
}
|
||||||
|
|
||||||
//function EWCreatorWindow::setIconView( %this )
|
//function ObjectCreator::setIconView( %this )
|
||||||
//{
|
//{
|
||||||
//echo( "setIconView" );
|
//echo( "setIconView" );
|
||||||
//
|
//
|
||||||
|
|
@ -590,7 +590,7 @@ function EWCreatorWindow::setListView( %this, %noupdate )
|
||||||
//%this.navigate( %this.address );
|
//%this.navigate( %this.address );
|
||||||
//}
|
//}
|
||||||
|
|
||||||
function EWCreatorWindow::findIconCtrl( %this, %name )
|
function ObjectCreator::findIconCtrl( %this, %name )
|
||||||
{
|
{
|
||||||
for ( %i = 0; %i < %this.contentCtrl.getCount(); %i++ )
|
for ( %i = 0; %i < %this.contentCtrl.getCount(); %i++ )
|
||||||
{
|
{
|
||||||
|
|
@ -602,7 +602,7 @@ function EWCreatorWindow::findIconCtrl( %this, %name )
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::createIcon( %this )
|
function ObjectCreator::createIcon( %this )
|
||||||
{
|
{
|
||||||
%ctrl = new GuiIconButtonCtrl()
|
%ctrl = new GuiIconButtonCtrl()
|
||||||
{
|
{
|
||||||
|
|
@ -630,11 +630,11 @@ function EWCreatorWindow::createIcon( %this )
|
||||||
return %ctrl;
|
return %ctrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::addFolderIcon( %this, %text )
|
function ObjectCreator::addFolderIcon( %this, %text )
|
||||||
{
|
{
|
||||||
%ctrl = %this.createIcon();
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
%ctrl.altCommand = "EWCreatorWindow.navigateDown(\"" @ %text @ "\");";
|
%ctrl.altCommand = "ObjectCreator.navigateDown(\"" @ %text @ "\");";
|
||||||
%ctrl.iconBitmap = "tools/gui/images/folder.png";
|
%ctrl.iconBitmap = "tools/gui/images/folder.png";
|
||||||
%ctrl.text = %text;
|
%ctrl.text = %text;
|
||||||
%ctrl.tooltip = %text;
|
%ctrl.tooltip = %text;
|
||||||
|
|
@ -646,7 +646,7 @@ function EWCreatorWindow::addFolderIcon( %this, %text )
|
||||||
%this.contentCtrl.addGuiControl( %ctrl );
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::addMissionObjectIcon( %this, %class, %name, %buildfunc )
|
function ObjectCreator::addMissionObjectIcon( %this, %class, %name, %buildfunc )
|
||||||
{
|
{
|
||||||
%ctrl = %this.createIcon();
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
|
|
@ -661,7 +661,7 @@ function EWCreatorWindow::addMissionObjectIcon( %this, %class, %name, %buildfunc
|
||||||
else
|
else
|
||||||
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
%cmd = "ObjectBuilderGui." @ %method @ "();";
|
||||||
|
|
||||||
%ctrl.altCommand = "ObjectBuilderGui.newObjectCallback = \"EWCreatorWindow.onFinishCreateObject\"; EWCreatorWindow.createObject( \"" @ %cmd @ "\" );";
|
%ctrl.altCommand = "ObjectBuilderGui.newObjectCallback = \"ObjectCreator.onFinishCreateObject\"; ObjectCreator.createObject( \"" @ %cmd @ "\" );";
|
||||||
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( %class );
|
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( %class );
|
||||||
%ctrl.text = %name;
|
%ctrl.text = %name;
|
||||||
%ctrl.class = "CreatorMissionObjectIconBtn";
|
%ctrl.class = "CreatorMissionObjectIconBtn";
|
||||||
|
|
@ -673,7 +673,7 @@ function EWCreatorWindow::addMissionObjectIcon( %this, %class, %name, %buildfunc
|
||||||
%this.contentCtrl.addGuiControl( %ctrl );
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::addShapeIcon( %this, %datablock )
|
function ObjectCreator::addShapeIcon( %this, %datablock )
|
||||||
{
|
{
|
||||||
%ctrl = %this.createIcon();
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
|
|
@ -683,7 +683,7 @@ function EWCreatorWindow::addShapeIcon( %this, %datablock )
|
||||||
|
|
||||||
%shapePath = ( %datablock.shapeFile !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
%shapePath = ( %datablock.shapeFile !$= "" ) ? %datablock.shapeFile : %datablock.shapeName;
|
||||||
|
|
||||||
%createCmd = "EWCreatorWindow.createObject( \\\"" @ %cmd @ "\\\" );";
|
%createCmd = "ObjectCreator.createObject( \\\"" @ %cmd @ "\\\" );";
|
||||||
%ctrl.altCommand = "showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );";
|
%ctrl.altCommand = "showImportDialog( \"" @ %shapePath @ "\", \"" @ %createCmd @ "\" );";
|
||||||
|
|
||||||
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( %class );
|
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( %class );
|
||||||
|
|
@ -697,7 +697,7 @@ function EWCreatorWindow::addShapeIcon( %this, %datablock )
|
||||||
%this.contentCtrl.addGuiControl( %ctrl );
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::addStaticIcon( %this, %fullPath )
|
function ObjectCreator::addStaticIcon( %this, %fullPath )
|
||||||
{
|
{
|
||||||
%ctrl = %this.createIcon();
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
|
|
@ -709,7 +709,7 @@ function EWCreatorWindow::addStaticIcon( %this, %fullPath )
|
||||||
"Date Created: " @ fileCreatedTime( %fullPath ) NL
|
"Date Created: " @ fileCreatedTime( %fullPath ) NL
|
||||||
"Last Modified: " @ fileModifiedTime( %fullPath );
|
"Last Modified: " @ fileModifiedTime( %fullPath );
|
||||||
|
|
||||||
%createCmd = "EWCreatorWindow.createStatic( \\\"" @ %fullPath @ "\\\" );";
|
%createCmd = "ObjectCreator.createStatic( \\\"" @ %fullPath @ "\\\" );";
|
||||||
%ctrl.altCommand = "showImportDialog( \"" @ %fullPath @ "\", \"" @ %createCmd @ "\" );";
|
%ctrl.altCommand = "showImportDialog( \"" @ %fullPath @ "\", \"" @ %createCmd @ "\" );";
|
||||||
|
|
||||||
%ctrl.iconBitmap = ( ( %ext $= ".dts" ) ? EditorIconRegistry::findIconByClassName( "TSStatic" ) : "tools/gui/images/iconCollada" );
|
%ctrl.iconBitmap = ( ( %ext $= ".dts" ) ? EditorIconRegistry::findIconByClassName( "TSStatic" ) : "tools/gui/images/iconCollada" );
|
||||||
|
|
@ -723,7 +723,7 @@ function EWCreatorWindow::addStaticIcon( %this, %fullPath )
|
||||||
%this.contentCtrl.addGuiControl( %ctrl );
|
%this.contentCtrl.addGuiControl( %ctrl );
|
||||||
}
|
}
|
||||||
|
|
||||||
function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
|
function ObjectCreator::addPrefabIcon( %this, %fullPath )
|
||||||
{
|
{
|
||||||
%ctrl = %this.createIcon();
|
%ctrl = %this.createIcon();
|
||||||
|
|
||||||
|
|
@ -735,7 +735,7 @@ function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
|
||||||
"Date Created: " @ fileCreatedTime( %fullPath ) NL
|
"Date Created: " @ fileCreatedTime( %fullPath ) NL
|
||||||
"Last Modified: " @ fileModifiedTime( %fullPath );
|
"Last Modified: " @ fileModifiedTime( %fullPath );
|
||||||
|
|
||||||
%ctrl.altCommand = "EWCreatorWindow.createPrefab( \"" @ %fullPath @ "\" );";
|
%ctrl.altCommand = "ObjectCreator.createPrefab( \"" @ %fullPath @ "\" );";
|
||||||
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( "Prefab" );
|
%ctrl.iconBitmap = EditorIconRegistry::findIconByClassName( "Prefab" );
|
||||||
%ctrl.text = %file;
|
%ctrl.text = %file;
|
||||||
%ctrl.class = "CreatorPrefabIconBtn";
|
%ctrl.class = "CreatorPrefabIconBtn";
|
||||||
|
|
@ -750,7 +750,7 @@ function EWCreatorWindow::addPrefabIcon( %this, %fullPath )
|
||||||
function CreatorPopupMenu::onSelect( %this, %id, %text )
|
function CreatorPopupMenu::onSelect( %this, %id, %text )
|
||||||
{
|
{
|
||||||
%split = strreplace( %text, "/", " " );
|
%split = strreplace( %text, "/", " " );
|
||||||
EWCreatorWindow.navigate( %split );
|
ObjectCreator.navigate( %split );
|
||||||
}
|
}
|
||||||
|
|
||||||
function alphaIconCompare( %a, %b )
|
function alphaIconCompare( %a, %b )
|
||||||
|
|
@ -779,7 +779,7 @@ function genericCreateObject( %class )
|
||||||
|
|
||||||
%cmd = "return new " @ %class @ "();";
|
%cmd = "return new " @ %class @ "();";
|
||||||
|
|
||||||
%obj = EWCreatorWindow.createObject( %cmd );
|
%obj = ObjectCreator.createObject( %cmd );
|
||||||
|
|
||||||
// In case the caller wants it.
|
// In case the caller wants it.
|
||||||
return %obj;
|
return %obj;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue