Initial commit

This commit is contained in:
Eagle517
2025-02-17 23:17:30 -06:00
commit 7cad314c94
4726 changed files with 1145203 additions and 0 deletions

View File

@ -0,0 +1,517 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(AIEButtonBarDlg) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiChunkedBitmapCtrl() {
profile = "GuiContentProfile";
horizSizing = "right";
vertSizing = "height";
position = "0 30";
extent = "120 420";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiCheckBoxCtrl(ExteriorCheckBox) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 23";
extent = "100 22";
minExtent = "8 8";
visible = "1";
command = "ExteriorCheckBox.updateCheckBox();";
helpTag = "0";
text = "Draw Ext";
};
new GuiCheckBoxCtrl(InteriorCheckBox) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 47";
extent = "100 22";
minExtent = "8 8";
visible = "1";
command = "InteriorCheckBox.updateCheckBox();";
helpTag = "0";
text = "Draw Int";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 6";
extent = "73 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Visual Options:";
};
new GuiCheckBoxCtrl(JetConnectionsCheckBox) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 73";
extent = "100 22";
minExtent = "8 8";
visible = "1";
command = "JetConnectionsCheckBox.updateCheckBox();";
helpTag = "0";
text = "Draw Jet";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 201";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "makeJettableGraph(Nav);";
helpTag = "0";
text = "Bot Graph";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 169";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "makeJettableGraph(Spawn);";
helpTag = "0";
text = "Spawn Graph";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 233";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "AIEButtonBarDlg.createLOSXref();";
helpTag = "0";
text = "Build LOS";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 265";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "navGraph.saveGraph();";
helpTag = "0";
text = "Save";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 151";
extent = "56 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Graph Build";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 315";
extent = "64 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "AI Objectives";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 331";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "AICreateObjectives();";
helpTag = "0";
text = "Build Objectives";
};
new GuiPopUpMenuCtrl(ObjectiveList) {
profile = "GuiPopUpProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 368";
extent = "101 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "New Objective";
maxPopupHeight = "200";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 395";
extent = "100 29";
minExtent = "8 8";
visible = "1";
command = "AISaveMissionObjectives();";
helpTag = "0";
text = "Save";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 102";
extent = "73 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Camera speed:";
};
new GuiSliderCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "6 121";
extent = "80 20";
minExtent = "80 20";
visible = "1";
variable = "value";
command = "$Camera::movementSpeed = $ThisControl.getValue();";
helpTag = "0";
range = "0.000000 200.000000";
ticks = "10";
value = "20";
};
};
};
//--- OBJECT WRITE END ---
//------------------------------------------------------------------------------
// Functions
//------------------------------------------------------------------------------
function makeUnbridgedGraph()
{
GraphCurrentOperation.setValue("Generating interior nodes...");
Canvas.repaint();
navGraph::generateInterior();
dataProgress();
GraphCurrentOperation.setValue("Remaking graph...");
Canvas.repaint();
remakeTheGraph();
dataProgress();
}
function makeJettableGraph(%NAVorSPAWN)
{
AIworking(true);
$NavGraph::operations = 7;
$NavGraph::operationsDone = 0;
navGraph.setGenMode(%NAVorSPAWN);
navGraph::exteriorInspect();
dataProgress();
makeUnbridgedGraph();
GraphCurrentOperation.setValue("Beginning slow bridge finding pass");
Canvas.repaint();
navGraph.assemble();
navGraph.cullIslands();
remakeTheGraph();
navGraph.pushBridges();
navGraph.makeTables();
dataProgress();
AIworking(false);
}
//------------------------------------------------------------------------------
function AIEButtonBarDlg::getPrefs(%this)
{
}
//------------------------------------------------------------------------------
function AIEbuttonBarDlg::setPrefs(%this)
{
}
//------------------------------------------------------------------------------
function AIEButtonBarDlg::init(%this)
{
InteriorCheckBox.setValue($pref::NavGraph::drawIndoor);
ExteriorCheckBox.setValue($pref::NavGraph::drawOutdoor);
if(!$pref::NavGraph::drawIndoor)
JetConnectionsCheckBox.visible = false;
JetConnectionsCheckBox.setValue($pref::NavGraph::drawJetEdges);
ObjectiveList.clear();
ObjectiveList.setText("New Objective");
ObjectiveList.add("Deploy Outdoor Turret", 1);
ObjectiveList.add("Deploy Indoor Turret", 2);
ObjectiveList.add("Deploy Inventory", 3);
ObjectiveList.add("Touch FlipFlop", 4);
ObjectiveList.add("Mortar Target", 5);
ObjectiveList.add("Repair Equipment", 6);
ObjectiveList.add("Attack Target", 7);
ObjectiveList.add("Defend Location", 8);
objectiveList.add("New Group", 9);
//ObjectivesList.sort();
}
//------------------------------------------------------------------------------
function AIEButtonBarDlg::onSleep(%this)
{
}
//------------------------------------------------------------------------------
function AIEButtonBarDlg::onWake(%this)
{
}
//------------------------------------------------------------------------------
function dataProgress()
{
$NavGraph::operationsDone++;
%percent = $NavGraph::operationsDone / $NavGraph::operations;
GraphBuildProgress.setValue(%percent);
Canvas.repaint();
}
//------------------------------------------------------------------------------
function remakeTheGraph()
{
GraphCurrentOperation.setValue("making graph...");
Canvas.repaint();
navGraph.makeGraph();
dataProgress();
}
//------------------------------------------------------------------------------
function AIEButtonBarDlg::createLOSXref()
{
AIworking(true);
GraphCurrentOperation.setValue("Making LOS CrossRef Table...");
GraphBuildProgress.setValue(0);
if(2.player)
navGraph.prepLOS(2.player.getTransform());
else
navGraph.prepLOS("0 0 0");
while(navGraph.makeLOS())
{
GraphBuildProgress.setValue($graphProcessPercent);
Canvas.repaint();
}
GraphBuildProgress.setValue(100);
Canvas.repaint();
AIworking(false);
}
function ExteriorCheckBox::updateCheckBox()
{
$pref::NavGraph::drawOutdoor = !$pref::NavGraph::drawOutdoor;
}
function InteriorCheckBox::updateCheckBox()
{
$pref::NavGraph::drawIndoor = !$pref::NavGraph::drawIndoor;
if(!$pref::NavGraph::drawIndoor)
JetConnectionsCheckBox.visible = false;
else
jetConnectionsCheckBox.visible = true;
}
function JetConnectionsCheckBox::updateCheckBox()
{
$pref::NavGraph::drawJetEdges = !$pref::NavGraph::drawJetEdges;
}
function AISaveMissionObjectives()
{
// once we have created all objecitves, save out the mis file
if(!isObject(MissionGroup))
{
error("No mission exists!");
return;
}
// check for read-only
%file = "FixMe/missions/" @ $Client::MissionFile;
if(!isWriteableFileName(%file))
{
error("Mission file '" @ %file @ "' is not writeable.");
return;
}
// ok, were good to save.
missionGroup.save("missions/" @ $Client::MissionFile);
}
function AIObjectivesLock(%lock)
{
%numTeams = nameToId("MissionGroup/Teams").getCount();
for(%j = 0; %j < %numTeams; %j++)
{
%objGroup = nameToId("MissionGroup/Teams/team" @ %j @ "/AIObjectives");
if(%objGroup == -1)
continue;
%objCount = %objGroup.getCount();
for(%i = 0; %i < %objCount; %i++)
{
%obj = %objGroup.getObject(%i);
%obj.locked = %lock;
}
}
// save
AISaveMissionObjectives();
}
function addNewObjective(%type)
{
if($AIEditor::inspectTeam == 1)
%team = 1;
else if($AIEditor::inspectTeam == 2)
%team = 2;
else
%team = 1;
%tGroup = nameToId("MissionGroup/Teams/team" @ %team @ "/AIObjectives");
if(%tGroup < 1)
return;
if($InstantGroup $= "MissionGroup")
$InstantGroup = %tGroup;
switch$(%type)
{
case "Defend Location":
%objective = new AIObjective(AIODefendLocation)
{
dataBlock = "AIObjectiveMarker";
};
case "Repair Equipment":
%objective = new AIObjective(AIORepairObject)
{
dataBlock = "AIObjectiveMarker";
};
case "Deploy Outdoor Turret":
%Objective = new AIObjective(AIODeployEquipment)
{
dataBlock = "AIObjectiveMarker";
weightLevel1 = 4100;
weightLevel2 = 0;
description = "Deploy outdoor Turret";
offense = false;
defense = true;
targetObjectId = -1;
targetObject = -1;
targetClientId = -1;
equipment = "TurretOutdoorDeployable";
buyEquipmentSet = "MediumOutdoorTurretSet";
};
case "Deploy Indoor Turret":
%Objective = new AIObjective(AIODeployEquipment)
{
dataBlock = "AIObjectiveMarker";
weightLevel1 = 4100;
weightLevel2 = 0;
description = "Deploy indoor Turret";
offense = false;
defense = true;
targetObjectId = -1;
targetObject = -1;
targetClientId = -1;
equipment = "TurretIndoorDeployable";
buyEquipmentSet = "MediumIndoorTurretSet";
};
case "Attack Target":
%objective = new AIObjective(AIOAttackObject)
{
dataBlock = "AIObjectiveMarker";
};
case "Touch FlipFlop":
%objective = new AIObjective(AIOTouchObject)
{
dataBlock = "AIObjectiveMarker";
};
case "Mortar Target":
%objective = new AIObjective(AIOMortarObject)
{
dataBlock = "AIObjectiveMarker";
};
case "Deploy Inventory":
%Objective = new AIObjective(AIODeployEquipment)
{
dataBlock = "AIObjectiveMarker";
weightLevel1 = 4100;
weightLevel2 = 0;
description = "Deploy Inventory Station";
offense = false;
defense = true;
targetObjectId = -1;
targetObject = -1;
targetClientId = -1;
equipment = "InventoryDeployable";
buyEquipmentSet = "MediumInventorySet";
};
case "New Group":
%set = new SimGroup("ObjectiveSet");
%tGroup.add(%set);
return;
default:
error("no defined type.");
return;
}
$InstantGroup.add(%objective);
aiEdit.clearSelection();
aiEdit.selectObject(%objective);
aiEdit.dropSelection();
%objective.location = %objective.getWorldBoxCenter();
Inspector.inspect(%objective);
InspectorNameEdit.setValue(%objective.getName());
}
function ObjectiveList::onSelect(%this, %id, %text)
{
addNewObjective(%text);
ObjectiveList.setText("New Objective");
}

View File

@ -0,0 +1,162 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(AIEFrameSetDlg) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
activeToolCount = "0";
new GuiFrameSetCtrl(AIEFrameSet) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "120 30";
extent = "520 420";
minExtent = "8 8";
visible = "1";
helpTag = "0";
columns = "0";
rows = "0";
borderWidth = "4";
borderColor = "206 206 206 206";
borderEnable = "dynamic";
borderMovable = "dynamic";
autoBalance = "0";
new GuiControl(AIEFrame) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "520 420";
minExtent = "8 8";
visible = "1";
helpTag = "0";
borderWidth = "2";
};
new GuiFrameSetCtrl(AIEToolFrameSet) {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "height";
position = "520 420";
extent = "20 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
columns = "0";
borderWidth = "3";
borderColor = "206 206 206 206";
borderEnable = "dynamic";
borderMovable = "dynamic";
autoBalance = "0";
};
};
};
//--- OBJECT WRITE END ---
//------------------------------------------------------------------------------
// Functions
//------------------------------------------------------------------------------
function AIEFrameSetDlg::getPrefs(%this)
{
}
function AIEFrameSetDlg::setPrefs(%this)
{
}
function AIEFrameSetDlg::onWake(%this)
{
$AIEdit = true;
AIEditorMap.push();
aiEdit.clearIgnoreList();
aiEdit.ignoreObjClass(AIObjective);
aiEdit.toggleIgnoreList = true;
aiEdit.renderNav = true;
}
function AIEFrameSetDlg::onSleep(%this)
{
$AIEdit = false;
AIEditorMap.pop();
EditorTree.open("MissionGroup");
}
function AIEFrameSetDlg::init(%this)
{
AIEFrame.add(aiEdit);
%this.resetFrames();
}
function AIEFrameSetDlg::update(%this)
{
// check the frame to see if it is visible
if(AIEToolFrameSet.getCount())
{
%res = getResolution();
//90 = width of button bar
%width = getWord(%res, 0) - 90;
if(AIEFrameSet.getColumnOffset(1) > %width - editor.minToolFrameWidth)
AIEFrameSet.setColumnOffset(1, %width - editor.minToolFrameWidth);
}
}
function AIEFrameSetDlg::resetFrames(%this)
{
%tools = AIEToolFrameSet;
while(%tools.getRowCount() > %tools.getCount())
%tools.removeRow();
while(%tools.getRowCount() < %tools.getCount())
%tools.addRow();
%offset = 400;
// update the frame view
%frameSet = AIEFrameSet;
if(!%tools.getCount() && (%frameSet.getColumnCount() > 1))
{
%Offset = %frameSet.getColumnOffset(1);
%frameSet.removeColumn();
}
if(%tools.getCount() && (%frameSet.getColumnCount() == 1))
{
%frameSet.addColumn();
%frameSet.setColumnOffset(1, %offset);
}
//if(%tools.getCount())
//%this.toolPaneOffset = AIEFrameSet.getColumnOffset(1);
%this.activeToolCount = %tools.getCount();
}
function AIEFrameSetDlg::addTool(%this, %tool)
{
%group = nameToId("MissionGroup/Teams/team" @ $AIEditor::inspectTeam @ "/AIObjectives");
if(%group == -1)
return false;
if($AIEditor::inspectTeam == 1)
EditorTree.open("MissionGroup/Teams/team1/AIObjectives");
else
EditorTree.open("MissionGroup/Teams/team2/AIObjectives");
AIEToolFrameSet.add(%tool);
%this.resetFrames();
return true;
}
function AIEFrameSetDlg::removeTool(%this, %tool)
{
AIEToolFrameSet.remove(%tool);
%this.resetFrames();
}

View File

@ -0,0 +1,66 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(AIEWorkingDlg) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "0";
helpTag = "0";
new GuiChunkedBitmapCtrl() {
profile = "GuiContentProfile";
horizSizing = "right";
vertSizing = "top";
position = "234 5";
extent = "400 130";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
new GuiTextCtrl() {
profile = "GuiBigTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "16 10";
extent = "378 40";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
text = "Building Graph ...";
};
new GuiProgressCtrl(GraphBuildProgress) {
profile = "GuiProgressProfile";
horizSizing = "center";
vertSizing = "top";
position = "29 50";
extent = "342 31";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
setValue = "0";
};
new GuiTextCtrl(GraphCurrentOperation) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "35 96";
extent = "8 18";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
};
};
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,32 @@
new WorldEditor(aiEdit)
{
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "520 420";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
selectHandle = "./SelectHandle.png";
defaultHandle = "./DefaultHandle.png";
lockedHandle = "./LockedHandle.png";
};
//------------------------------------------------------------------------------
function AIworking(%working)
{
if(%working)
{
Canvas.pushDialog(AIEWorkingDlg);
GraphBuildProgress.setValue(0.0);
}
else
Canvas.popDialog(AIEWorkingDlg);
Canvas.repaint();
}

View File

@ -0,0 +1,90 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(AIEditorToolBar) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiControl() {
profile = "GuiContentProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "640 30";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiCheckBoxCtrl(AIEditorObjectivesTree1CheckBox) {
profile = "GuiRadioProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "290 5";
extent = "114 20";
minExtent = "8 8";
visible = "1";
command = "AIEditorObjectivesTree1CheckBox.setTreeGui(1);";
helpTag = "0";
text = "Objectives Team 1";
};
new GuiCheckBoxCtrl(AIEditorObjectivesTree2CheckBox) {
profile = "GuiRadioProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "405 5";
extent = "114 20";
minExtent = "8 8";
visible = "1";
command = "AIEditorObjectivesTree2CheckBox.setTreeGui(2);";
helpTag = "0";
text = "Objectives Team 2";
};
new GuiCheckBoxCtrl(AIEditorObjectivesInspectorCheckBox) {
profile = "GuiRadioProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "520 5";
extent = "114 20";
minExtent = "8 8";
visible = "1";
command = "if($ThisControl.getValue()) AIEFrameSetDlg.addTool(EditorToolInspectorGui); else AIEFrameSetDlg.removeTool(EditorToolInspectorGui);";
helpTag = "0";
text = "Objectives Inspector";
};
};
};
//--- OBJECT WRITE END ---
function AIEditorToolBar::init(%this)
{
}
function AIEditorObjectivesTree1CheckBox::setTreeGui(%this, %team)
{
$AIEditor::inspectTeam = %team;
AIEditorObjectivesTree2CheckBox.setValue(false);
if($ThisControl.getValue())
%isSet = AIEFrameSetDlg.addTool(EditorToolTreeViewGui);
else
%isSet = AIEFrameSetDlg.removeTool(EditorToolTreeViewGui);
$ThisControl.setValue(%isSet);
}
function AIEditorObjectivesTree2CheckBox::setTreeGui(%this, %team)
{
$AIEditor::inspectTeam = %team;
AIEditorObjectivesTree1CheckBox.setValue(false);
if($ThisControl.getValue())
%isSet = AIEFrameSetDlg.addTool(EditorToolTreeViewGui);
else
%isSet = AIEFrameSetDlg.removeTool(EditorToolTreeViewGui);
$ThisControl.setValue(%isSet);
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 604 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 842 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 847 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

View File

@ -0,0 +1,272 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(TerrainEditorValuesSettingsGui) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "117 113";
extent = "408 247";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Terrain Action Values";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
closeCommand = "Canvas.popDIalog(TerrainEditorValuesSettingsGui);";
new GuiControl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "198 27";
extent = "203 115";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "86 12";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "ETerrainEditor.adjustHeightVal";
command = "ETerrainEditor.adjustHeightVal = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "86 37";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "ETerrainEditor.setHeightVal";
command = "ETerrainEditor.setHeightVal = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "86 62";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "ETerrainEditor.scaleVal";
command = "ETerrainEditor.scaleVal = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "86 87";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "ETerrainEditor.smoothFactor";
command = "ETerrainEditor.smoothFactor = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 12";
extent = "64 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Adjust Height";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 37";
extent = "49 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Set Height";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "11 62";
extent = "60 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Scale Height";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 87";
extent = "70 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Smooth Factor";
maxLength = "255";
};
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "218 205";
extent = "80 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.popDIalog(TerrainEditorValuesSettingsGui);";
helpTag = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiControl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "7 27";
extent = "188 212";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiFilterCtrl(TESoftSelectFilter) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 22";
extent = "155 162";
minExtent = "8 8";
visible = "1";
helpTag = "0";
controlPoints = "7";
filter = "1.000000 0.833333 0.666667 0.500000 0.333333 0.166667 0.000000";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "6 4";
extent = "67 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Soft Selection";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 189";
extent = "8 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "0";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 26";
extent = "8 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "1";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "60 190";
extent = "45 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "<Radius>";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "125 187";
extent = "50 18";
minExtent = "8 8";
visible = "1";
variable = "ETerrainEditor.softSelectRadius";
command = "ETerrainEditor.softSelectRadius = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
};
new GuiButtonCtrl(TESettingsApplyButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "307 205";
extent = "80 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Apply";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,632 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(WorldEditorSettingsDlg) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "90 55";
extent = "459 370";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "WorldEditor Settings";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
closeCommand = "Canvas.popDialog(WorldEditorSettingsDlg);";
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "369 343";
extent = "80 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.popDialog(WorldEditorSettingsDlg);";
helpTag = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiControl(WESettingsGeneralTab) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "231 27";
extent = "220 210";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 10";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.planarMovement";
command = "EWorldEditor.planarMovement = $ThisControl.getValue();";
helpTag = "0";
text = "Planar Movement";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 36";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.boundingBoxCollision";
command = "EWorldEditor.boundingBoxCollision = $ThisControl.getValue();";
helpTag = "0";
text = "Collide With Object\'s Bounding Box";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 88";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.axisGizmoActive";
command = "EWorldEditor.axisGizmoActive = $ThisControl.getValue();";
helpTag = "0";
text = "Axis Gizmo Active";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 62";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.objectsUseBoxCenter";
command = "EWorldEditor.objectsUseBoxCenter = $ThisControl.getValue();";
helpTag = "0";
text = "Objects Use Box Center";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "13 123";
extent = "83 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Min Scale Factor:";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "13 146";
extent = "83 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Min Scale Factor:";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "104 123";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.minScaleFactor";
command = "EWorldEditor.minScaleFactor = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "104 146";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.maxScaleFactor";
command = "EWorldEditor.maxScaleFactor = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "13 178";
extent = "80 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Visible Distance:";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "104 178";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "pref::Editor::visibleDistance";
command = "$pref::Editor::visibleDistance = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
};
new GuiControl(WESettingsDisplayTab) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "7 27";
extent = "220 210";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 10";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.renderPlane";
command = "EWorldEditor.renderPlane = $ThisControl.getValue();";
helpTag = "0";
text = "Render Plane";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 37";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.renderPlaneHashes";
command = "EWorldEditor.renderPlaneHashes = $ThisControl.getValue();";
helpTag = "0";
text = "Render Plane Hashes";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 64";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.renderObjText";
command = "EWorldEditor.renderObjText = $ThisControl.getValue();";
helpTag = "0";
text = "Render Object Text";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 119";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.renderSelectionBox";
command = "EWorldEditor.renderSelectionBox = $ThisControl.getValue();";
helpTag = "0";
text = "Render Selection Box";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "93 151";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.planeDim";
command = "EWorldEditor.planeDim = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "18 151";
extent = "59 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Plane Extent";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "18 175";
extent = "44 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Grid Size";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "93 175";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.gridSize";
command = "EWorldEditor.gridSize = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 90";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.renderObjHandle";
command = "EWorldEditor.renderObjHandle = $ThisControl.getValue();";
helpTag = "0";
text = "Render Object Handle";
groupNum = "-1";
buttonType = "ToggleButton";
};
};
new GuiControl(WESettingsSnapTab) {
profile = "GuiContentProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "6 52";
extent = "220 210";
minExtent = "8 8";
visible = "0";
helpTag = "0";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "22 39";
extent = "44 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Grid Size";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "97 39";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.gridSize";
command = "EWorldEditor.gridSize = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 10";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.snapToGrid";
command = "EWorldEditor.snapToGrid = $ThisControl.getValue();";
helpTag = "0";
text = "Snap To Grid";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 66";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.snapRotations";
command = "EWorldEditor.snapRotations = $ThisControl.getValue();";
helpTag = "0";
text = "Snap Rotations";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "22 95";
extent = "56 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Snap Angle";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "97 95";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.rotationSnap";
command = "EWorldEditor.rotationSnap = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
};
new GuiControl(WESettingsMouseTab) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "7 241";
extent = "220 121";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 10";
extent = "200 24";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.showMousePopupInfo";
command = "EWorldEditor.showMousePopupInfo = $ThisControl.getValue();";
helpTag = "0";
text = "Show Mouse Popup Info";
groupNum = "-1";
buttonType = "ToggleButton";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "101 35";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.mouseMoveScale";
command = "EWorldEditor.mouseMoveScale = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "101 60";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.mouseRotateScale";
command = "EWorldEditor.mouseRotateScale = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "101 85";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.mouseScaleScale";
command = "EWorldEditor.mouseScaleScale = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 60";
extent = "61 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Rotate Scale";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 85";
extent = "57 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Scale Scale";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "12 35";
extent = "56 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Move Scale";
maxLength = "255";
};
};
new GuiControl(WESettingsMiscTab) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "231 241";
extent = "220 64";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 35";
extent = "78 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Project Distance";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 9";
extent = "89 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Gizmo Screen Len";
maxLength = "255";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "101 35";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.projectDistance";
command = "EWorldEditor.projectDistance = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "101 9";
extent = "107 18";
minExtent = "8 8";
visible = "1";
variable = "EWorldEditor.axisGizmoMaxScreenLen";
command = "EWorldEditor.axisGizmoMaxScreenLen = $ThisControl.getValue();";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
};
};
};
//--- OBJECT WRITE END ---

View File

@ -0,0 +1,680 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(ObjectBuilderGui) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
new GuiWindowCtrl(OBTargetWindow) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "217 74";
extent = "256 282";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextCtrl() {
profile = "GuiCenterTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "13 31";
extent = "84 25";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
text = "Object Name:";
};
new GuiTextEditCtrl(OBObjectName) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "105 31";
extent = "143 18";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
historySize = "0";
};
new GuiControl(OBContentWindow) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "8 56";
extent = "240 193";
minExtent = "0 0";
visible = "1";
setFirstResponder = "0";
modal = "1";
helpTag = "0";
};
new GuiButtonCtrl(OBOKButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "70 254";
extent = "80 20";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
command = "ObjectBuilderGui.onOK();";
helpTag = "0";
text = "OK";
};
new GuiButtonCtrl(OBCancelButton) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "156 254";
extent = "80 20";
minExtent = "8 8";
visible = "1";
setFirstResponder = "0";
modal = "1";
command = "ObjectBuilderGui.onCancel();";
helpTag = "0";
text = "Cancel";
};
};
};
//--- OBJECT WRITE END ---
function ObjectBuilderGui::init(%this)
{
%this.baseOffsetX = 9;
%this.baseOffsetY = 10;
%this.scriptFile = "editor/newObject.cs";
%this.defaultObjectName = "";
%this.defaultFieldStep = 26;
%this.columnOffset = 95;
%this.fieldNameExtent = "132 18";
%this.textEditExtent = "127 18";
%this.checkBoxExtent = "18 18";
%this.popupMenuExtent = "127 18";
%this.fileButtonExtent = "127 18";
//
%this.numControls = 0;
%this.reset();
}
function ObjectBuilderGui::reset(%this)
{
%this.curXPos = %this.baseOffsetX;
%this.curYPos = %this.baseOffsetY;
%this.createCallback = "";
%this.currentControl = 0;
//
OBObjectName.setValue(%this.defaultObjectName);
//
%this.newObject = 0;
%this.className = "";
%this.numFields = 0;
//
for(%i = 0; %i < %this.numControls; %i++)
{
%this.textControls[%i].delete();
%this.controls[%i].delete();
}
%this.numControls = 0;
}
//------------------------------------------------------------------------------
function ObjectBuilderGui::createFileType(%this, %index)
{
if(%index >= %this.numFields || %this.field[%index, name] $= "")
{
error("ObjectBuilderGui::createFileType: invalid field");
return;
}
//
if(%this.field[%index, text] $= "")
%name = %this.field[%index, name];
else
%name = %this.field[%index, text];
//
%this.textControls[%this.numControls] = new GuiTextCtrl() {
profile = "GuiTextProfile";
text = %name;
extent = %this.fieldNameExtent;
position = %this.curXPos @ " " @ %this.curYPos;
modal = "1";
};
//
%this.controls[%this.numControls] = new GuiButtonCtrl() {
profile = "GuiButtonProfile";
extent = %this.fileButtonExtent;
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
modal = "1";
command = %this @ ".getFileName(" @ %index @ ");";
};
%val = %this.field[%index, value];
%this.controls[%this.numControls].setValue(fileBase(%val) @ fileExt(%val));
%this.numControls++;
%this.curYPos += %this.defaultFieldStep;
}
function ObjectBuilderGui::getFileName(%this, %index)
{
if(%index >= %this.numFields || %this.field[%index, name] $= "")
{
error("ObjectBuilderGui::getFileName: invalid field");
return;
}
%val = %this.field[%index, value];
%path = filePath(%val);
%ext = fileExt(%val);
%this.currentControl = %index;
getLoadFilename(%path @ "*" @ %ext, %this @ ".gotFileName");
}
function ObjectBuilderGui::gotFileName(%this, %name)
{
%this.controls[%this.currentControl].setValue(%name);
}
//------------------------------------------------------------------------------
function ObjectBuilderGui::createDataBlockType(%this, %index)
{
if(%index >= %this.numFields || %this.field[%index, name] $= "")
{
error("ObjectBuilderGui::createDataBlockType: invalid field");
return;
}
//
if(%this.field[%index, text] $= "")
%name = %this.field[%index, name];
else
%name = %this.field[%index, text];
//
%this.textControls[%this.numControls] = new GuiTextCtrl() {
profile = "GuiTextProfile";
text = %name;
extent = %this.fieldNameExtent;
position = %this.curXPos @ " " @ %this.curYPos;
modal = "1";
};
//
%this.controls[%this.numControls] = new GuiPopupMenuCtrl() {
profile = "GuiPopUpMenuProfile";
extent = %this.popupMenuExtent;
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
modal = "1";
maxPopupHeight = "200";
};
%classname = getWord(%this.field[%index, value], 0);
%this.controls[%this.numControls].add("", -1);
// add the datablocks
for(%i = 0; %i < DataBlockGroup.getCount(); %i++)
{
%obj = DataBlockGroup.getObject(%i);
if(%obj.getClassName() $= %classname)
%this.controls[%this.numControls].add(%obj.getName(), %i);
}
%this.controls[%this.numControls].setValue(getWord(%this.field[%index, value], 1));
%this.numControls++;
%this.curYPos += %this.defaultFieldStep;
}
function ObjectBuilderGui::createBoolType(%this, %index)
{
if(%index >= %this.numFields || %this.field[%index, name] $= "")
{
error("ObjectBuilderGui::createBoolType: invalid field");
return;
}
//
if(%this.field[%index, value] $= "")
%value = 0;
else
%value = %this.field[%index, value];
//
if(%this.field[%index, text] $= "")
%name = %this.field[%index, name];
else
%name = %this.field[%index, text];
//
%this.textControls[%this.numControls] = new GuiTextCtrl() {
profile = "GuiTextProfile";
text = %name;
extent = %this.fieldNameExtent;
position = %this.curXPos @ " " @ %this.curYPos;
modal = "1";
};
//
%this.controls[%this.numControls] = new GuiCheckBoxCtrl() {
profile = "GuiCheckBoxProfile";
extent = %this.checkBoxExtent;
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
modal = "1";
};
%this.controls[%this.numControls].setValue(%value);
%this.numControls++;
%this.curYPos += %this.defaultFieldStep;
}
function ObjectBuilderGui::createStringType(%this, %index)
{
if(%index >= %this.numFields || %this.field[%index, name] $= "")
{
error("ObjectBuilderGui::createStringType: invalid field");
return;
}
//
if(%this.field[%index, text] $= "")
%name = %this.field[%index, name];
else
%name = %this.field[%index, text];
//
%this.textControls[%this.numControls] = new GuiTextCtrl() {
profile = "GuiTextProfile";
text = %name;
extent = %this.fieldNameExtent;
position = %this.curXPos @ " " @ %this.curYPos;
modal = "1";
};
//
%this.controls[%this.numControls] = new GuiTextEditCtrl() {
profile = "GuiTextEditProfile";
extent = %this.textEditExtent;
text = %this.field[%index, value];
position = %this.curXPos + %this.columnOffset @ " " @ %this.curYPos;
modal = "1";
};
%this.numControls++;
%this.curYPos += %this.defaultFieldStep;
}
//------------------------------------------------------------------------------
function ObjectBuilderGui::adjustSizes(%this)
{
if(%this.numControls == 0)
%this.curYPos = 0;
OBTargetWindow.extent = "256 " @ %this.curYPos + 88;
OBContentWindow.extent = "240 " @ %this.curYPos;
OBOKButton.position = "70 " @ %this.curYPos + 62;
OBCancelButton.position = "156 " @ %this.curYPos + 62;
}
function ObjectBuilderGui::process(%this)
{
if(%this.className $= "")
{
error("ObjectBuilderGui::process: classname is not specified");
return;
}
OBTargetWindow.setValue("Building Object: " @ %this.className);
//
for(%i = 0; %i < %this.numFields; %i++)
{
switch$(%this.field[%i, type])
{
case "TypeBool":
%this.createBoolType(%i);
case "TypeDataBlock":
%this.createDataBlockType(%i);
case "TypeFile":
%this.createFileType(%i);
default:
%this.createStringType(%i);
}
}
// add the controls
for(%i = 0; %i < %this.numControls; %i++)
{
OBContentWindow.add(%this.textControls[%i]);
OBContentWindow.add(%this.controls[%i]);
}
//
%this.adjustSizes();
//
Canvas.pushDialog(%this);
}
function ObjectBuilderGui::processNewObject(%this, %obj)
{
if(%this.createCallback !$= "")
eval(%this.createCallback);
if(!isObject(EWorldEditor))
return;
$InstantGroup.add(%obj);
EWorldEditor.clearSelection();
EWorldEditor.selectObject(%obj);
EWorldEditor.dropSelection();
}
function ObjectBuilderGui::onOK(%this)
{
// get current values
for(%i = 0; %i < %this.numControls; %i++)
%this.field[%i, value] = %this.controls[%i].getValue();
//
%file = new FileObject();
%file.openForWrite(%this.scriptFile);
%file.writeLine(%this @ ".newObject = new " @ %this.className @ "(" @ OBObjectName.getValue() @ ") {");
for(%i = 0; %i < %this.numFields; %i++)
%file.writeLine(" " @ %this.field[%i, name] @ " = \"" @ %this.field[%i, value] @ "\";");
%file.writeLine("};");
%file.close();
%file.delete();
//
exec(%this.scriptFile);
if(%this.newObject != 0)
%this.processNewObject(%this.newObject);
%this.reset();
Canvas.popDialog(%this);
}
function ObjectBuilderGui::onCancel(%this)
{
%this.reset();
Canvas.popDialog(%this);
}
function ObjectBuilderGui::addField(%this, %name, %type, %text, %value)
{
%this.field[%this.numFields, name] = %name;
%this.field[%this.numFields, type] = %type;
%this.field[%this.numFields, text] = %text;
%this.field[%this.numFields, value] = %value;
%this.numFields++;
}
//------------------------------------------------------------------------------
// Environment
//------------------------------------------------------------------------------
function ObjectBuilderGui::buildfxFoliageReplicator(%this)
{
%this.className = "fxFoliageReplicator";
%this.process();
}
function ObjectBuilderGui::buildfxShapeReplicator(%this)
{
%this.className = "fxShapeReplicator";
%this.process();
}
function ObjectBuilderGui::buildfxSunLight(%this)
{
%this.className = "fxSunLight";
%this.process();
}
function ObjectBuilderGui::buildSky(%this)
{
%this.className = "Sky";
%this.addField("materialList", "TypeFile", "Material list", "Lush_l4.dml");
%this.addField("cloudSpeed[0]", "TypePoint2", "Cloud0 Speed", "0.0000003 0.0000003");
%this.addField("cloudSpeed[1]", "TypePoint2", "Cloud1 Speed", "0.0000006 0.0000006");
%this.addField("cloudSpeed[2]", "TypePoint2", "Cloud2 Speed", "0.0000009 0.0000009");
%this.addField("cloudHeightPer[0]", "TypeFloat", "Cloud0 Height", "0.349971");
%this.addField("cloudHeightPer[1]", "TypeFloat", "Cloud1 Height", "0.25");
%this.addField("cloudHeightPer[2]", "TypeFloat", "Cloud2 Height", "0.199973");
%this.addField("visibleDistance", "TypeFloat", "Visible distance", "900");
%this.addField("fogDistance", "TypeFloat", "Fog distance", "600");
%this.addField("fogColor", "TypeColor", "Fog color", "0.5 0.5 0.5");
%this.addField("fogVolume1", "TypePoint3", "Fog volume", "120 0 100");
%this.addField("fogVolume2", "TypePoint3", "Fog volume", "0 0 0");
%this.addField("fogVolume3", "TypePoint3", "Fog volume", "0 0 0");
%this.process();
}
function ObjectBuilderGui::buildfxLight(%this)
{
%this.className = "fxLight";
%this.addField("dataBlock", "TypeDataBlock", "fxLight Data", "fxLightData");
%this.process();
}
function ObjectBuilderGui::buildSun(%this)
{
%this.className = "Sun";
%this.addField("direction", "TypeVector", "Direction", "1 1 -1");
%this.addField("color", "TypeColor", "Sun color", "0.8 0.8 0.8");
%this.addField("ambient", "TypeColor", "Ambient color", "0.2 0.2 0.2");
%this.process();
}
function ObjectBuilderGui::buildLightning(%this)
{
%this.className = "Lightning";
%this.addField("dataBlock", "TypeDataBlock", "Data block", "LightningData DefaultStorm");
%this.process();
}
function ObjectBuilderGui::buildWater(%this)
{
%this.className = "WaterBlock";
// jff: this object needs some work!!
%this.addField("extent", "TypePoint3", "Extent", "100 100 10");
%this.addField("textureSize", "TypePoint2", "Texture size", "32 32");
%this.addField("params[0]", "TypePoint4", "Wave Param0", "0.32 -0.67 0.066 0.5");
%this.addField("params[1]", "TypePoint4", "Wave Param1", "0.63 -2.41 0.33 0.21");
%this.addField("params[2]", "TypePoint4", "Wave Param2", "0.39 0.39 0.2 0.133");
%this.addField("params[3]", "TypePoint4", "Wave Param3", "1.21 -0.61 0.13 -0.33");
%this.addField("floodFill", "TypeBool", "Flood fill?", "true");
%this.addField("seedPoints", "TypeString", "Seed points", "0 0 1 0 1 1 0 1");
%this.addField("surfaceTexture", "TypeString", "Surface Texture",
"fps/data/water/water");
%this.addField("envMapTexture", "TypeString", "Env Map Texture",
"fps/data/skies/sunset_0007");
%this.process();
}
function ObjectBuilderGui::buildTerrain(%this)
{
%this.className = "TerrainBlock";
%this.createCallback = "ETerrainEditor.attachTerrain();";
%this.addField("terrainFile", "TypeFile", "Terrain file", "terrains/terr1.ter");
%this.addField("squareSize", "TypeInt", "Square size", "8");
%this.process();
}
function ObjectBuilderGui::buildAudioEmitter(%this)
{
%this.className = "AudioEmitter";
%this.addField("profile", "TypeDataBlock", "Sound Profile", "AudioProfile");
%this.addField("description", "TypeDataBlock", "Sound Description", "AudioDescription");
%this.addField("fileName", "TypeFile", "Audio file", "");
%this.addField("useProfileDescription", "TypeBool", "Use profile's desc?", "false");
%this.addFIeld("volume", "TypeFloat", "Volume", "1.0");
%this.addField("isLooping", "TypeBool", "Looping?", "true");
%this.addField("is3D", "TypeBool", "Is 3D sound?", "true");
%this.addField("ReferenceDistance", "TypeFloat", "Reference distance", "5.0"); //EFM
%this.addField("maxDistance", "TypeFloat", "Max distance", "35.0");
%this.addField("coneInsideAngle", "TypeInt", "Cone inside angle", "90");
%this.addField("coneOutsideAngle", "TypeInt", "Cone outside angle", "120");
%this.addField("coneOutsideVolume", "TypeFloat", "Cone outside volume", "0.25");
%this.addField("loopCount", "TypeInt", "Loop count", "-1");
%this.addField("minLoopGap", "TypeInt", "Min loop gap (ms)", "0");
%this.addField("maxLoopGap", "TypeInt", "Max loop gap (ms)", "0");
%this.addField("type", "TypeInt", "Audio type", $SimAudioType);
%this.process();
}
function ObjectBuilderGui::buildPrecipitation(%this)
{
%this.className = "Precipitation";
%this.addField("nameTag", "TypeString", "Name", "");
%this.addField("dataBlock", "TypeDataBlock", "Precipitation data", "PrecipitationData");
%this.process();
}
function ObjectBuilderGui::buildParticleEmitter(%this)
{
%this.className = "ParticleEmitterNode";
%this.addField("dataBlock", "TypeDataBlock", "datablock", "ParticleEmitterNodeData");
%this.addField("emitter", "TypeDataBlock", "Particle data", "ParticleEmitterData");
%this.process();
}
//------------------------------------------------------------------------------
// Mission
//------------------------------------------------------------------------------
function ObjectBuilderGui::buildMissionArea(%this)
{
%this.className = "MissionArea";
%this.addField("area", "TypeRect", "Bounding area", "0 0 1024 1024");
%this.process();
}
function ObjectBuilderGui::buildPath(%this)
{
%this.className = "Path";
%this.process();
}
function ObjectBuilderGui::buildPathMarker(%this)
{
%this.className = "Marker";
%this.process();
}
//function ObjectBuilderGui::buildForcefield(%this)
//{
// %this.className = "ForcefieldBare";
// %this.addField("dataBlock", "TypeDataBlock", "Data Block", "ForceFieldBareData defaultForceFieldBare");
// %this.process();
//}
function ObjectBuilderGui::buildTrigger(%this)
{
%this.className = "Trigger";
%this.addField("dataBlock", "TypeDataBlock", "Data Block", "TriggerData defaultTrigger");
%this.addField("polyhedron", "TypeTriggerPolyhedron", "Polyhedron", "0 0 0 1 0 0 0 -1 0 0 0 1");
%this.process();
}
function ObjectBuilderGui::buildPhysicalZone(%this)
{
%this.className = "PhysicalZone";
%this.addField("polyhedron", "TypeTriggerPolyhedron", "Polyhedron", "0 0 0 1 0 0 0 -1 0 0 0 1");
%this.process();
}
function ObjectBuilderGui::buildCamera(%this)
{
%this.className = "Camera";
%this.addField("position", "TypePoint3", "Position", "0 0 0");
%this.addField("rotation", "TypePoint4", "Rotation", "1 0 0 0");
%this.addField("dataBlock", "TypeDataBlock", "Data block", "CameraData Observer");
%this.addField("team", "TypeInt", "Team", "0");
%this.process();
}
//------------------------------------------------------------------------------
// System
//------------------------------------------------------------------------------
function ObjectBuilderGui::buildSimGroup(%this)
{
%this.className = "SimGroup";
%this.process();
}
//------------------------------------------------------------------------------
// AI
//------------------------------------------------------------------------------
//function ObjectBuilderGui::buildObjective(%this)
//{
// %this.className = "AIObjective";
// %this.process();
//}
//function ObjectBuilderGui::buildNavigationGraph(%this)
//{
// %this.className = "NavigationGraph";
// %this.process();
//}