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

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,150 @@
$pref::Audio::drivers = "";
$pref::Audio::environmentEnabled = 0;
$pref::Audio::forceMaxDistanceUpdate = 0;
$pref::Audio::masterVolume = 0.8;
$pref::CloudsOn = "1";
$pref::Decal::decalTimeout = "5000";
$pref::Decal::maxNumDecals = "256";
$pref::decalsOn = "1";
$pref::DTSExporter::ambientColourCustB = "120";
$pref::DTSExporter::ambientColourCustG = "120";
$pref::DTSExporter::ambientColourCustR = "120";
$pref::DTSExporter::ambientColourPopup = "2";
$pref::DTSExporter::backgroundColourCustB = "120";
$pref::DTSExporter::backgroundColourCustG = "120";
$pref::DTSExporter::backgroundColourCustR = "120";
$pref::DTSExporter::backgroundColourPopup = "4";
$pref::DTSExporter::backgroundSleepAmount = "100";
$pref::DTSExporter::boldAnimatedNodes = "1";
$pref::DTSExporter::clampMaxMipMap = "0";
$pref::DTSExporter::collisionMeshes = "0";
$pref::DTSExporter::currentProjectDirectory = "1";
$pref::DTSExporter::directlightAngle = "24 0 193";
$pref::DTSExporter::directlightColourCustB = "120";
$pref::DTSExporter::directlightColourCustG = "120";
$pref::DTSExporter::directlightColourCustR = "120";
$pref::DTSExporter::directlightColourPopup = "5";
$pref::DTSExporter::directlightDisplayDistance = "1.5";
$pref::DTSExporter::displayType = "1";
$pref::DTSExporter::dpTabChoice = "0";
$pref::DTSExporter::drawMounted = "1";
$pref::DTSExporter::enableLights = "1";
$pref::DTSExporter::flushTextureCacheScheduleTime = "10";
$pref::DTSExporter::gridSize = "0.1";
$pref::DTSExporter::gridToggle = "1";
$pref::DTSExporter::gridType = "3";
$pref::DTSExporter::hudDisplayColour = "0";
$pref::DTSExporter::hudLocation = "1";
$pref::DTSExporter::hudShowBillboardLOD = "0";
$pref::DTSExporter::hudShowDetailLevels = "1";
$pref::DTSExporter::hudShowFPS = "0";
$pref::DTSExporter::hudShowGridSize = "1";
$pref::DTSExporter::invertMouseRotation = "0";
$pref::DTSExporter::itemCoordDisplayType = "1";
$pref::DTSExporter::LODControl = "0";
$pref::DTSExporter::losCollisionMeshes = "0";
$pref::DTSExporter::meshFade = "0";
$pref::DTSExporter::meshFadeAmount = "0.5";
$pref::DTSExporter::nodeAnimatedColor = "0";
$pref::DTSExporter::nodeAxisColourPopup = "8";
$pref::DTSExporter::nodeConnectionColourPopup = "13";
$pref::DTSExporter::nodeDrawType = "1";
$pref::DTSExporter::nodeVertex0Color = "5";
$pref::DTSExporter::nodeVertex1Color = "8";
$pref::DTSExporter::ProjectDirectory1 = "demo/data/shapes";
$pref::DTSExporter::ProjectDirectoryName1 = "";
$pref::DTSExporter::ProjectDirectoryTotal = "1";
$pref::DTSExporter::renderNodeVertices = "1";
$pref::DTSExporter::SGLightingPack = "0";
$pref::DTSExporter::showAllNodes = "1";
$pref::DTSExporter::showRotationTranslationAxis = "1";
$pref::DTSExporter::showSortedMeshOrder = "0";
$pref::DTSExporter::solidBoundingBox = "1";
$pref::DTSExporter::sortCurrentMountList = "2";
$pref::DTSExporter::sortMountedList = "2";
$pref::DTSExporter::sortNodeList = "0";
$pref::DTSExporter::sortObjectList = "0";
$pref::DTSExporter::sortSequenceList = "0";
$pref::DTSExporter::spTabChoice = "0";
$pref::DTSExporter::threadTargetPopup = "0";
$pref::DTSExporter::threadTransition = "0";
$pref::DTSExporter::threadTransitionDuration = "0.5";
$pref::DTSExporter::threadTransitionToPopup = "1";
$pref::DTSExporter::tristripBias = "0";
$pref::DTSExporter::windowOnTop = "0";
$pref::DTSExporter::wireframeColourPopup = "4";
$pref::Editor::visibleDistance = "2100";
$pref::environmentMaps = "1";
$pref::Input::JoystickEnabled = "0";
$pref::Input::KeyboardEnabled = "1";
$pref::Input::KeyboardTurnSpeed = 0.1;
$pref::Input::LinkMouseSensitivity = 1;
$pref::Input::MouseEnabled = "0";
$pref::Interior::detailAdjust = "1";
$pref::Interior::DynamicLights = "1";
$pref::Interior::LightUpdatePeriod = "66";
$pref::Interior::lockArrays = "1";
$pref::Interior::ShowEnvironmentMaps = "1";
$pref::Interior::TexturedFog = "0";
$pref::Interior::VertexLighting = "0";
$Pref::Net::LagThreshold = "0";
$pref::Net::PacketRateToClient = "10";
$pref::Net::PacketRateToServer = "32";
$pref::Net::PacketSize = "200";
$pref::NumCloudLayers = "3";
$pref::OpenGL::allowCompression = "0";
$pref::OpenGL::allowTexGen = "1";
$pref::OpenGL::disableARBMultitexture = "0";
$pref::OpenGL::disableARBTextureCompression = "0";
$pref::OpenGL::disableEXTCompiledVertexArray = "0";
$pref::OpenGL::disableEXTFogCoord = "0";
$pref::OpenGL::disableEXTPalettedTexture = "0";
$pref::OpenGL::disableEXTTexEnvCombine = "0";
$pref::OpenGL::disableSubImage = "0";
$pref::OpenGL::force16BitTexture = "0";
$pref::OpenGL::forcePalettedTexture = "0";
$pref::OpenGL::gammaCorrection = "0.5";
$pref::OpenGL::maxHardwareLights = "3";
$pref::OpenGL::noDrawArraysAlpha = "0";
$pref::OpenGL::noEnvColor = "0";
$pref::OpenGL::textureAnisotropy = "0";
$pref::OpenGL::textureTrilinear = "0";
$pref::Player::renderMyItems = "1";
$pref::Player::renderMyPlayer = "1";
$pref::sceneLighting::cacheLighting = 1;
$pref::sceneLighting::cacheSize = 20000;
$pref::sceneLighting::purgeMethod = "lastCreated";
$pref::sceneLighting::terrainGenerateLevel = 1;
$pref::shadows = "2";
$pref::SkyOn = "1";
$pref::Terrain::dynamicLights = "1";
$pref::Terrain::enableDetails = "1";
$pref::Terrain::enableEmbossBumps = "1";
$pref::Terrain::screenError = "4";
$pref::Terrain::texDetail = "0";
$pref::Terrain::textureCacheSize = "220";
$pref::TS::autoDetail = "1";
$pref::TS::detailAdjust = "1";
$pref::TS::fogTexture = "0";
$pref::TS::screenError = "5";
$pref::TS::skipFirstFog = "0";
$pref::TS::skipLoadDLs = "0";
$pref::TS::skipRenderDLs = "0";
$pref::TS::UseTriangles = "0";
$pref::Video::allowD3D = "1";
$pref::Video::allowOpenGL = "1";
$pref::Video::appliedPref = "1";
$pref::Video::clipHigh = "0";
$pref::Video::defaultsRenderer = "MOBILITY RADEON 9600 x86/SSE2";
$pref::Video::defaultsVendor = "ATI Technologies Inc.";
$pref::Video::deleteContext = "1";
$pref::Video::disableVerticalSync = 1;
$pref::Video::displayDevice = "OpenGL";
$pref::Video::fullScreen = "0";
$pref::Video::only16 = "0";
$pref::Video::preferOpenGL = "1";
$pref::Video::profiledRenderer = "MOBILITY RADEON 9600 x86/SSE2";
$pref::Video::profiledVendor = "ATI Technologies Inc.";
$pref::Video::resolution = "800 600 32";
$pref::Video::safeModeOn = "1";
$pref::visibleDistanceMod = "1";

Binary file not shown.

Binary file not shown.

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();
//}

View File

@ -0,0 +1,6 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Texture Painter...<font:Arial:16>
The Terrain Texture Painter tool is used to manually paint terrain textures on the terrain. Users can select up to six different textures in the boxes in the upper right corner of the screen. Selecting a texture will place a black box around it. The terrain brush can then be used to paint the texture on the terrain.
Terrains with more than four textures may exhibit rendering irregularities if all those textures are used in the same area of a map. In general it is wise to use four or fewer textures on any individual terrain map.

View File

@ -0,0 +1,8 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Torque Game Engine Licenses<font:Arial:16>
For information about Torque Game Engine Licenses please visit our website.
<a:www.garagegames.com/pg/product/view.php?id=1>Torque Game Engine - Indie License</a>
<a:www.garagegames.com/pg/product/view.php?id=31>Torque Game Engine - Commercial Use License</a>

View File

@ -0,0 +1,40 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Gui Editor...
GUI Editor Basics<font:Arial:16>
Press the F10 key on the keyboard to toggle the GUI Editor on and off. The GUI Editor will start editing the current main content control, minus any dialogs that may be visible.
The GUI Editor is broken up into four main visual components. In the upper left portion of the screen is the content editor, where controls can be placed, moved and resized. In the upper right is the tree, that shows the current content control hierarchy. The lower left panel is the tool bar, which contains functions for aligning, and spacing controls as well as creating new controls and screens. The lower right pane is the inspector, where the currently selected control's attributes are displayed.
<font:Arial Bold:20>Mouse Editing<font:Arial:16>
Left clicking the mouse on a control in the content editor selects that control. Once selected, a control can be moved by clicking and dragging its content area, or resized using one of the 8 black sizing knobs. Shift-clicking on several controls allows the user to select more than one control at once. In this case, the sizing knobs turn white, and can no longer be used to size the control, but the controls can still be moved by dragging. Only controls that share the same parent can be selected at the same time.
The parent control of the currently selected control is outlined with a yellow and blue band. This control is known as the <spush><font:Arial Bold:16>Current Add Parent<spop>. Any new control created from the toolbar or pasted from the clipboard will be added to this control. The Current Add Parent control can be set manually by either left-clicking one of its children, or right-clicking the control itself.
<font:Arial Bold:20>Keyboard Commands<font:Arial:16>
The editor supports several keyboard commands and shortcuts:
<spush><font:Arial Bold:16>Control-A<spop> - Select All. Selects all the controls in the Current Add Parent.
<spush><font:Arial Bold:16>Control-C<spop> - Copy. Copys the currently selected control(s) to the clipboard.
<spush><font:Arial Bold:16>Control-X<spop> - Cut. Cuts the currently selected control(s) to the clipboard.
<spush><font:Arial Bold:16>Control-V<spop> - Paste. Pastes any control(s) on the clipboard into the Current Add Parent.
<spush><font:Arial Bold:16>Arrow Keys<spop> - Movement. Moves the current control selection one pixel in the direction of the arrow.
<spush><font:Arial Bold:16>Shift-Arrow Keys<spop> - Movement. Moves the current control selection ten pixels in the direction of the arrow.
<spush><font:Arial Bold:16>Delete/Backspace<spop> - Delete. Deletes the current control selection.
<font:Arial Bold:20>Toolbar Commands<font:Arial:16>
The toolbar has several command buttons that operate on the current selection set and creating and saving guis, as well as pop-up menus for creating new controls and changing the currently edited gui. The functions of the buttons are described below:
<spush><font:Arial Bold:16>Align Left<spop> - Aligns the left edge of all controls in the current selection set to the leftmost point of any of the selected controls.
<spush><font:Arial Bold:16>Align Right<spop> - Aligns the right edge of all controls in the current selection set to the rightmost point of any of the selected controls.
<spush><font:Arial Bold:16>Center Horiz<spop> - Centers horizontally all selected controls in the rectangle bounded by the current selection set.
<spush><font:Arial Bold:16>Align Top<spop> - Aligns the top edge of all controls in the current selection set to the topmost point of any of the selected controls.
<spush><font:Arial Bold:16>Align Bottom<spop> - Aligns the bottom edge of all controls in the current selection set to the bottommost point of any of the selected controls.
<spush><font:Arial Bold:16>Help<spop> - Displays this help dialog.
<spush><font:Arial Bold:16>Space Vert<spop> - Evenly spaces vertically all selected controls.
<spush><font:Arial Bold:16>Space Horiz<spop> - Evenly spaces horizontally all selected controls.
<spush><font:Arial Bold:16>Bring Front<spop> - Moves the selected control in front of its sibling controls.
<spush><font:Arial Bold:16>Send Back<spop> - Moves the selected control behind its sibling controls.
<spush><font:Arial Bold:16>New...<spop> - Brings up a dialog that allows the user to create and name a new control for editing.
<spush><font:Arial Bold:16>Save<spop> - Brings up a dialog that allows the user to save the current content control to a file.
<spush><font:Arial Bold:16>New Control (popup)<spop> - Displays a list of all controls that the user can create to add to the current content control.
<spush><font:Arial Bold:16>Show GUI (popup)<spop> - Displays the name of the gui currently being edited. Selecting this popup allows the user to choose a screen to edit from all loaded guis.

View File

@ -0,0 +1,48 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Mission Editor...
Mission Editor Overview<font:Arial:16>
The Mission Editor is the in-game tool for creating and editing landscapes and placing objects in the 3D world.
Press the F11 key while in the game to toggle the Mission Editor on and off. The mission editor will start editing the currently loaded mission.
The Mission Editor is composed of the following tools, selectable from the Window menu:
<font:Arial Bold:16>World Editor<font:Arial:16> - Full screen object movement and selection.
<font:Arial Bold:16>World Editor Inspector<font:Arial:16> - Used to inspect the properties of mission objects
<font:Arial Bold:16>World Editor Creator<font:Arial:16> - Used to create new mission objects
<font:Arial Bold:16>Mission Area Editor<font:Arial:16> - Used to adjust the bounds of the mission area, as well as mirror terrain data
<font:Arial Bold:16>Terrain Editor<font:Arial:16> - Tool for manually adjusting the terrain heightfield and square properties
<font:Arial Bold:16>Terrain Terraform Editor<font:Arial:16> - Tool for procedurally generating the terrain heightfield from fractal operations
<font:Arial Bold:16>Terrain Texture Editor<font:Arial:16> - Tool for procedurally generating the terrain textures based on rules
<font:Arial Bold:16>Terrain Texture Painter<font:Arial:16> - Tool for manually painting terrain textures on the terrain
There are several editor functions and menus that are available in all mission editor modes:
<font:Arial Bold:20>Basic Movement<font:Arial:16>
The normal movement keys can be used to control both the player and the camera. The right mouse button is used to rotate the camera or adjust the player's view.
<font:Arial Bold:20>File Menu<font:Arial:16>
<font:Arial Bold:16>New Mission...<font:Arial:16> - Creates a new empty mission with a default terrain and sky
<font:Arial Bold:16>Open Mission...<font:Arial:16> - Opens an existing mission for editing
<font:Arial Bold:16>Save Mission<font:Arial:16> - Saves changes to the current mission to disk
<font:Arial Bold:16>Save Mission As...<font:Arial:16> - Saves the current mission under a new name
<font:Arial Bold:16>Import Terraform Data...<font:Arial:16> - Imports terraform rules from an existing terrain file
<font:Arial Bold:16>Import Texture Data...<font:Arial:16> - Imports terrain texture rules from an existing terrain file
<font:Arial Bold:16>Export Terraform Bitmap...<font:Arial:16> - Only active from the Terrain Terraform Editor - exports the current terraform map to a bitmap
<font:Arial Bold:20>Edit Menu<font:Arial:16>
<font:Arial Bold:16>Undo<font:Arial:16> - Undoes the last action in terrain or world editing. Not all actions can be undone
<font:Arial Bold:16>Redo<font:Arial:16> - Redoes the last undone action
<font:Arial Bold:16>Cut<font:Arial:16> - Cuts the selected objects in the world editor from the mission to the clipboard
<font:Arial Bold:16>Copy<font:Arial:16> - Copys the selected objects in the world editor to the clipboard
<font:Arial Bold:16>Paste<font:Arial:16> - Pastes the current clipboard contents into the mission
<font:Arial Bold:16>Select All<font:Arial:16> - Selects all mission objects in the world editor
<font:Arial Bold:16>Select None<font:Arial:16> - Clears the current selection in the world and terrain editors
<font:Arial Bold:16>Relight Scene<font:Arial:16> - Recomputes mission static lighting
<font:Arial Bold:16>World Editor Settings...<font:Arial:16> - Accesses the settings dialog for the World Editor
<font:Arial Bold:16>Terrain Editor Settings...<font:Arial:16> - Accesses the settings dialog for the Terrain Editor
<font:Arial Bold:20>Camera Menu<font:Arial:16>
<font:Arial Bold:16>Drop Camera At Player<font:Arial:16> - Moves the camera object to the location of the player, and sets the mode to camera movement mode
<font:Arial Bold:16>Drop Player At Camera<font:Arial:16> - Moves the player object to the location of the movable camera, and sets the mode to player movement mode
<font:Arial Bold:16>Toggle Camera<font:Arial:16> - Toggles between player and camera movement mode
<font:Arial Bold:16>Slowest...Fastest<font:Arial:16> - Adjusts the speed of the camera

View File

@ -0,0 +1,53 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>World Editor...
World Editor Basics<font:Arial:16>
The World Editor has three seperate "windows" in the Mission Editor:
World Editor - a full screen object manipulator
World Editor Inspector - used for inspecting and editing the properties of objects
World Editor Creator - used for creating new mission objects
The World Editor main view is a view of the 3D world. Objects in this view (interiors, shapes, markers, etc) can be manipulated with the mouse and keyboard.
The following mouse and keyboard functions exist:
<font:Arial Bold Italic:16>Clicking on an unselected object<font:Arial:16> - deselects all currently selected objects and selects the clicked object
<font:Arial Bold Italic:16>Clicking in empty space<font:Arial:16> - click-drags a box around objects, and selects all objects in the box
<font:Arial Bold Italic:16>Shift-clicking on an object<font:Arial:16> - toggles selection of the clicked object
<font:Arial Bold Italic:16>Mouse dragging a selected object<font:Arial:16> - moves the selected objects, either on a horizontal plane, or sticking to the terrain, depending on the setting of the "Planar Movement" checkbox in the World Editor Settings dialog
<font:Arial Bold Italic:16>Control-clicking and drag<font:Arial:16> - moves the selected objects vertically
<font:Arial Bold Italic:16>Alt-clicking and drag<font:Arial:16> - rotates the selected objects about the vertical axis
<font:Arial Bold Italic:16>Alt-control-clicking and drag<font:Arial:16> - scales the selected object by a face on the bounding box
If gizmos are enabled in the World Editor Settings dialog, they can also be clicked and dragged:
<font:Arial Bold Italic:16>click-drag gizmo axis<font:Arial:16> - move selection along that axis
<font:Arial Bold Italic:16>alt-click-drag gizmo axis<font:Arial:16> - rotate selection on that axis
<font:Arial Bold Italic:16>alt-control-click-drag gizmo axis<font:Arial:16> - scale along that axis
<font:Arial Bold:20>World Menu<font:Arial:16>
The World Menu contains world editor specific options for controlling properties of the current selection, as well as choosing where new objects are dropped. The following list describes the world menu options:
<font:Arial Bold:16>Lock Selection<font:Arial:16> - Locks the current selection so that it cannot be manipulated from the world editor view
<font:Arial Bold:16>Unlock Selection<font:Arial:16> - Unlocks a locked selection
<font:Arial Bold:16>Hide Selection<font:Arial:16> - Hides the current selection to reduce clutter while editing
<font:Arial Bold:16>Show Selection<font:Arial:16> - Shows hidden objects in the selection
<font:Arial Bold:16>Delete Selection<font:Arial:16> - Deletes the currently selected objects
<font:Arial Bold:16>Camera To Selection<font:Arial:16> - Moves the camera to the selected objects
<font:Arial Bold:16>Reset Transforms<font:Arial:16> - Resets the rotation and scale on the selected objects
<font:Arial Bold:16>Drop Selection<font:Arial:16> - Re-drops the selected objects into the mission according to the drop rule (see below)
<font:Arial Bold:16>Add Selection to Instant Group<font:Arial:16> - Moves the currently selected objects into the current Instant Group.
<font:Arial Bold:16>Drop at Origin<font:Arial:16> - New objects will be created at the origin
<font:Arial Bold:16>Drop at Camera<font:Arial:16> - New objects will be created at the camera's location
<font:Arial Bold:16>Drop at Camera w/Rot<font:Arial:16> - New objects will be created at the camera's location with the camera's current orientation
<font:Arial Bold:16>Drop below Camera<font:Arial:16> - New objects will be created below the camera's location
<font:Arial Bold:16>Drop at Screen Center<font:Arial:16> - New objects will be created in the world where the view direction hits an object
<font:Arial Bold:16>Drop at Centroid<font:Arial:16> - New objects will be created in the world at the center of the selection
<font:Arial Bold:16>Drop to Ground<font:Arial:16> - New objects will be dropped at the terrain ground level
<font:Arial Bold:20>World Editor Tree<font:Arial:16>
The World Editor tree view is displayed in the upper right screen quadrant in both the World Editor Inspector and the World Editor Creator. This tree displays the hierarchy of the mission data file. Objects selected in the tree will also be selected in the main view. There is a special group selection call the <font:Arial Bold:16>Instant Group<font:Arial:16>. This group is where objects that are pasted are placed, as well as where objects created from the World Editor Creator are placed. In the World Editor tree view the instant group is displayed with a grey hilight. To change the current instant group, Alt-click on a group in the tree view.
<font:Arial Bold:20>World Editor Inspector<font:Arial:16>
The World Editor Inspector allows the user to specify properties of mission objects. When an object is selected in Inspector mode, that object's properties will be displayed in the lower right quadrant of the screen. Once properties are edited, clicking the apply button will set those properties into the object. Dynamic properties can be assigned to objects with the Dynamic Fields Add button. Dynamic fields are accessable through the scripting language and are used to add game-specific properties to mission objects.
<font:Arial Bold:20>World Editor Creator<font:Arial:16>
The World Editor Creator displays a tree view in the lower left corner of the screen. This tree contains all objects that can be created in a mission.

View File

@ -0,0 +1,9 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Mission Area Editor...<font:Arial:16>
The Mission Area Editor displays an overhead height map in the upper right corner of the screen, with markers for mission objects, a box for the mission area and a pair of lines denoting the current field of view. Clicking anywhere on the display will move the current view object (either camera or player) to that location in the mission.
To edit the mission area, click on the "Edit Area" checkbox. This will display 8 resizing knobs on the mission area box, that can be dragged with the mouse.
The "Center" button will cause the terrain file data to be repositioned and centered at 0,0 in the center of the mission area box.
To mirror the terrain, click on the Mirror button. This will put the mission area editor in mirror mode. The left and right arrow buttons adjust the mirror plane angle to one of 8 different angles (2 axis aligned, 2 45-degree splits), and the Apply button will mirror the terrain across the mirror plane.

View File

@ -0,0 +1,17 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Editor...<font:Arial:16>
The terrain editor is used to manually modify the terrain height map and square properties. Terrain editing is accomplished using the brush. The brush is a selection of terrain points or squares centered around the mouse cursor. The brush is either a circle or square area, and can be one of several size selected from the brush menu. The brush can also be either a hard brush - where the affect on the terrain is the same across the surface of the brush - or a soft brush - where the brush's influence on terrain diminishes towards the edges of the brush. The Terrain Editor Settings dialog filter view controls the falloff of the soft brush.
The following terrain editing action modes can be selected from the <font:Arial Bold:16>Action<font:Arial:16> menu.
<font:Arial Bold:16>Select<font:Arial:16> - Painting with the brush selects grid points
<font:Arial Bold:16>Adjust Selection<font:Arial:16> - The currently selected grid points can be raised or lowered as a group
<font:Arial Bold:16>Add Dirt<font:Arial:16> - "Dirt" is added at the center of the brush
<font:Arial Bold:16>Excavate<font:Arial:16> - "Dirt" is removed from the center of the brush
<font:Arial Bold:16>Ajust Height<font:Arial:16> - The brush selection can be dragged to raise or lower it
<font:Arial Bold:16>Flatten<font:Arial:16> - The brush surface is set to a flat plane height
<font:Arial Bold:16>Smooth<font:Arial:16> - Rough areas are made more smooth in the bounds of the brush
<font:Arial Bold:16>Set Height<font:Arial:16> - The terrain within the brush is set to a constant height (configurable in the Terrain Editor Settings)
<font:Arial Bold:16>Set Empty<font:Arial:16> - The squares covered by the brush are made into holes in the terrain
<font:Arial Bold:16>Clear Empty<font:Arial:16> - The squares covered by the brush are made solid
<font:Arial Bold:16>Paint Material<font:Arial:16> - The current terrain texture material will be painted with the brush

View File

@ -0,0 +1,21 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Terraform Editor...<font:Arial:16>
The Terrain Terraform Editor is used to algorithmically generate terrain heightfields. Heightfield operations are arranged in a stack, with some operations using the results of previous operations to produce new heightfields. The results of the last operation on the stack can be applied to the terrain using the Apply button.
The Terraform Editor has two panes - the top pane displays information about the currently selected operation, and the bottom pane shows the current operation stack. Between the two is a pull down menu for the creation of new operations. The first operation in the stack is always the General operation (which can't be deleted).
The following operations are supported in the editor:
<font:Arial Bold:16>fBm Fractal<font:Arial:16> - Fractal for creating bumpy hills
<font:Arial Bold:16>Rigid Multifractal<font:Arial:16> - Fractal for creating ridges and sweeping valleys
<font:Arial Bold:16>Canyon Fractal<font:Arial:16> - Fractal for creating vertical canyon ridges
<font:Arial Bold:16>Sinus<font:Arial:16> - Overlapping sine wave patterns with different frequencies useful for creating rolling hills
<font:Arial Bold:16>Bitmap<font:Arial:16> - Used to import an existing 256x256 bitmap as a heightfield
<font:Arial Bold:16>Turbulence<font:Arial:16> - perturbs another operation on the stack
<font:Arial Bold:16>Smoothing<font:Arial:16> - smooths another operation on the stack
<font:Arial Bold:16>Smooth Water<font:Arial:16> - smooths water
<font:Arial Bold:16>Smooth Ridges/valleys<font:Arial:16> - smooths an existing operation on edge boundaries
<font:Arial Bold:16>Filter<font:Arial:16> - filters an existing operation based on a curve
<font:Arial Bold:16>Thermal Erosion<font:Arial:16> - erodes an existing operation using a thermal erosion algorithm
<font:Arial Bold:16>Hydraulic Erosion<font:Arial:16> - erodes an existing operation using a hydraulic erosion algorithm
<font:Arial Bold:16>Blend<font:Arial:16> - blends two existing operations acording to a scale factor and mathmatical operator
<font:Arial Bold:16>Terrain File<font:Arial:16> - loads an existing terrain file onto the stack

View File

@ -0,0 +1,12 @@
<lmargin%:5><rmargin%:95><font:Arial Bold:20>Terrain Texture Editor...<font:Arial:16>
The Terrain Texture Editor is used to algorithmically place terrain texures based on the heightfield at the bottom of the terraformer heightfield stack. The texture editor has three main interface elements on the right side of the screen - from top to bottom they are the operation inspector pane, the material list, and the placement operation list.
Essentially, terrain materials (textures) are added with the "Add Material" button. This will look for any texture (.png or .jpg) in a subdirectory of any directory named "terrains". Once a material is added to the terrain, the user can select one of several placement operations that govern where that material will be placed on the terrain - they are:
<font:Arial Bold:16>Place by Fractal<font:Arial:16> - Places the terrain texture randomly across the terrain based on a brownian motion fractal.
<font:Arial Bold:16>Place by Height<font:Arial:16> - Places the texture based on an elevation filter
<font:Arial Bold:16>Place by Slope<font:Arial:16> - Places the texture based on a slope filter
<font:Arial Bold:16>Place by Water Level<font:Arial:16> - Places the texture based on the water level parameter in the terraform editor
Pressing the "Apply" button applies the current texture operation list to the terrain file.

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 615 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -0,0 +1,74 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(ConsoleDlg) {
profile = "GuiDefaultProfile";
new GuiWindowCtrl()
{
profile = "GuiWindowProfile";
position = "0 0";
extent = "640 370";
text = "Console";
new GuiScrollCtrl()
{
profile = "GuiScrollProfile";
position = "0 0";
extent = "640 350";
hScrollBar = "alwaysOn";
vScrollBar = "alwaysOn";
horizSizing = "width";
vertSizing = "height";
new GuiConsole("testArrayCtrl")
{
profile = "GuiConsoleProfile";
position = "0 0";
};
};
new GuiConsoleEditCtrl("ConsoleEntry")
{
profile = "GuiTextEditProfile";
position = "0 350";
extent = "640 20";
historySize = 20;
altCommand = "ConsoleEntry::eval();";
horizSizing = "width";
vertSizing = "top";
};
};
};
//--- OBJECT WRITE END ---
$ConsoleActive = false;
function ConsoleEntry::eval()
{
%text = ConsoleEntry.getValue();
echo("==>" @ %text);
eval(%text);
ConsoleEntry.setValue("");
}
function ToggleConsole(%make)
{
if (%make)
{
if ($ConsoleActive)
{
if ( $enableDirectInput )
activateKeyboard();
Canvas.popDialog(ConsoleDlg);
$ConsoleActive = false;
}
else
{
if ( $enableDirectInput )
deactivateKeyboard();
Canvas.pushDialog(ConsoleDlg, 99);
$ConsoleActive = true;
}
}
}

Binary file not shown.

View File

@ -0,0 +1,29 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(FrameOverlayGui) {
profile = "GuiModelessDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 8";
visible = "True";
setFirstResponder = "True";
modal = "false";
helpTag = "0";
noCursor = true;
new GuiConsoleTextCtrl(TextOverlayControl) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "5 5";
extent = "15 18";
minExtent = "8 8";
visible = "True";
setFirstResponder = "True";
modal = "True";
helpTag = "0";
expression = "10";
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,572 @@
//----------------------------------------------------------------
new GuiControlProfile (BackFillProfile)
{
opaque = true;
fillColor = "0 94 94";
border = true;
borderColor = "255 128 128";
fontType = "Arial";
fontSize = 12;
fontColor = "0 0 0";
fontColorHL = "32 100 100";
fixedExtent = true;
justify = "center";
};
new GuiControl(GuiEditorGui) {
profile = GuiDefaultProfile;
position = "0 0";
extent = "800 600";
helpPage = "3. Gui Editor";
new GuiMenuBar(GuiEditorMenuBar) {
profile = "GuiMenuBarProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "800 22";
minExtent = "8 8";
visible = "1";
helpTag = "0";
};
new GuiFrameSetCtrl()
{
position = "0 22";
extent = "800 578";
profile = "GuiButtonProfile";
horizSizing = "width";
vertSizing = "height";
columns = "0 640";
rows = "0";
new GuiControl() {
position = "0 0";
extent = "640 578";
minExtent = "64 64";
horizSizing = "width";
vertSizing = "height";
profile = GuiDefaultProfile;
//----------------------------------------
// toolbar
new GuiControl() {
profile = "GuiWindowProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "640 28";
new GuiControlListPopup(GuiEditorClassPopup)
{
profile = "GuiEditorClassProfile";
position = "8 6";
extent = "180 16";
};
new GuiPopUpMenuCtrl(GuiEditorContentList)
{
profile = "GuiEditorClassProfile";
position = "196 6";
extent = "180 16";
};
new GuiPopUpMenuCtrl(GuiEditorResList)
{
profile = "GuiEditorClassProfile";
position = "382 6";
extent = "180 16";
};
};
new GuiEditorRuler(GuiEditorTopRuler) {
position = "10 28";
extent = "630 10";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiButtonProfile";
refCtrl = GuiEditorScroll;
};
new GuiEditorRuler(GuiEditorLeftRuler) {
position = "0 38";
extent = "10 540";
horizSizing = "right";
vertSizing = "height";
profile = "GuiButtonProfile";
refCtrl = GuiEditorScroll;
};
new GuiScrollCtrl(GuiEditorScroll)
{
profile = "GuiScrollProfile";
position = "10 38";
extent = "630 540";
horizSizing = "width";
vertSizing = "height";
vScrollBar = "dynamic";
hScrollBar = "dynamic";
new GuiControl(GuiEditorRegion)
{
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
new GuiControl() // background
{
profile = "BackFillProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
};
new GuiControl(GuiEditorContent)
{
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
};
new GuiEditCtrl(GuiEditor)
{
profile = "GuiTextEditProfile"; // so it's tabable
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
};
};
};
};
new GuiFrameSetCtrl()
{
position = "640 0";
minExtent = "128 64";
extent = "160 600";
profile = "GuiButtonProfile";
horizSizing = "width";
vertSizing = "height";
columns = "0";
rows = "0 300";
//----------------------------------------
// Tree View
new GuiScrollCtrl()
{
profile = "GuiScrollProfile";
minExtent = "72 64";
position = "0 0";
extent = "160 300";
horizSizing = "width";
vertSizing = "height";
vScrollBar = "alwaysOn";
hScrollBar = "dynamic";
new GuiTreeViewCtrl(GuiEditorTreeView)
{
profile = "GuiTreeViewProfile";
position = "0 0";
horizSizing = "width";
};
};
//----------------------------------------
// Inspector
new GuiControl() {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "160 300";
minExtent = "64 64";
new GuiButtonCtrl () {
profile = "GuiButtonSmProfile";
position = "6, 16";
extent = "40 16";
font = "12 252 Arial";
fontHL = "12 253 Arial";
text = "APPLY";
command = "GuiEditorInspectApply();";
fillColor = "249";
borderColor = "249";
selectBorderColor = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
position = "52 4";
extent = "30 16";
font = "12 244 Arial";
text = "Name:";
};
new GuiTextEditCtrl (GuiEditorInspectName) {
profile = "GuiTextEditProfile";
position = "84 3";
extent = "72 18";
text = "";
horizSizing = "width";
vertSizing = "bottom";
};
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
position = "0 24";
extent = "160 276";
horizSizing = "width";
vertSizing = "height";
vScrollBar = "alwaysOn";
hScrollBar = "alwaysOff";
new GuiInspector (GuiEditorInspectFields) {
useFieldGrouping = false;
profile = "GuiDefaultProfile";
position = "0 0";
extent = "140 0";
horizSizing = "width";
vertSizing = "bottom";
};
};
};
};
};
};
//----------------------------------------
new GuiControl(NewGuiDialog)
{
profile = "GuiDialogProfile";
position = "0 0";
extent = "640 480";
new GuiWindowCtrl()
{
profile = "GuiWindowProfile";
position = "220 146";
extent = "200 188";
text = "Create new GUI";
canMove = "false";
canClose = "false";
canMinimize = "false";
canMaximize = "false";
horizSizing = "center";
vertSizing = "center";
new GuiTextCtrl()
{
profile = "GuiTextProfile";
position = "20 28";
text = "GUI Name:";
};
new GuiTextEditCtrl(NewGuiDialogName)
{
profile = "GuiTextEditProfile";
position = "20 44";
extent = "160 20";
};
new GuiTextCtrl()
{
profile = "GuiTextProfile";
position = "20 68";
text = "Class:";
};
new GuiControlListPopup(NewGuiDialogClass)
{
profile = "GuiControlListPopupProfile";
position = "20 84";
extent = "160 20";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
position = "56 156";
extent = "40 16";
text = "Create";
command = "GuiEditorCreate();";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
position = "104 156";
extent = "40 16";
text = "Cancel";
command = "Canvas.popDialog(NewGuiDialog);";
};
};
};
//----------------------------------------
function GuiEditorStartCreate()
{
NewGuiDialogClass.setText("GuiControl");
NewGuiDialogClass.sort();
NewGuiDialogName.setValue("NewGui");
Canvas.pushDialog(NewGuiDialog);
}
//----------------------------------------
function GuiEditorCreate()
{
%name = NewGuiDialogName.getValue();
%class = NewGuiDialogClass.getText();
Canvas.popDialog(NewGuiDialog);
%obj = eval("return new " @ %class @ "(" @ %name @ ");");
GuiEditorOpen(%obj);
}
//----------------------------------------
function GuiEditorSaveGui()
{
%obj = GuiEditorContent.getObject(0);
if(%obj == -1 || %obj.getName() $= "")
return;
%name = %obj.getName() @ ".gui";
getSaveFilename("*.gui", "GuiEditorSaveGuiCallback", %name);
}
function GuiEditorSaveGuiCallback(%name)
{
%obj = GuiEditorContent.getObject(0);
// make sure it is saved...
if(!%obj.save(%name))
{
MessageBoxOK("GuiEditor Save Failure", "Failed to save '" @ %name @ "'. The file may be read-only.");
}
}
//----------------------------------------
function GuiEdit(%val)
{
if(%val != 0)
return;
%content = Canvas.getContent();
if(%content == GuiEditorGui.getId())
{
//GlobalActionMap.bind(mouse, button1, mouselook);
%obj = GuiEditorContent.getObject(0);
if(%obj != -1)
{
GuiGroup.add(%obj);
Canvas.setContent(%obj);
}
GlobalActionMap.unbind( keyboard, "delete" );
}
else
{
//GlobalActionMap.unbind(mouse, button1);
GuiEditorOpen(%content);
}
}
package GuiEditor_BlockDialogs
{
function GuiCanvas::pushDialog()
{
}
function GuiCanvas::popDialog()
{
}
};
//----------------------------------------
function GuiEditorOpen(%content)
{
GuiEditorMenuBar.clearMenus();
GuiEditorMenuBar.addMenu("File", 0);
GuiEditorMenuBar.addMenuItem("File", "New GUI...", 1);
GuiEditorMenuBar.scriptCommand["File", 1] = "GuiEditorStartCreate();";
GuiEditorMenuBar.addMenuItem("File", "Save GUI...", 2);
GuiEditorMenuBar.scriptCommand["File", 2] = "GuiEditorSaveGui();";
GuiEditorMenuBar.addMenuItem("File", "-", 0);
GuiEditorMenuBar.addMenuItem("File", "GUI Editor Help...", 3, "F1");
GuiEditorMenuBar.scriptCommand["File", 3] = "getHelp(\"3. Gui Editor\");";
GuiEditorMenuBar.addMenuItem("File", "Toggle GUI Editor...", 4, "F10");
GuiEditorMenuBar.scriptCommand["File", 4] = "GuiEdit(0);";
GuiEditorMenuBar.addMenu("Edit", 1);
GuiEditorMenuBar.addMenuItem("Edit", "Cut", 3, "Ctrl X");
GuiEditorMenuBar.scriptCommand["Edit", 3] = "GuiEditor.saveSelection($GUI::clipboardFile); GuiEditor.deleteSelection();";
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Cut", 3);
GuiEditorMenuBar.addMenuItem("Edit", "Copy", 4, "Ctrl C");
GuiEditorMenuBar.scriptCommand["Edit", 4] = "GuiEditor.saveSelection($GUI::clipboardFile);";
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Copy", 4);
GuiEditorMenuBar.addMenuItem("Edit", "Paste", 5, "Ctrl V");
GuiEditorMenuBar.scriptCommand["Edit", 5] = "GuiEditor.loadSelection($GUI::clipboardFile);";
GuiEditorMenuBar.setMenuItemBitmap("Edit", "Paste", 5);
GuiEditorMenuBar.addMenuItem("Edit", "-", 0);
GuiEditorMenuBar.addMenuItem("Edit", "Select All", 6, "Ctrl A");
GuiEditorMenuBar.scriptCommand["Edit", 6] = "GuiEditor.selectAll();";
GuiEditorMenuBar.addMenu("Layout", 2);
GuiEditorMenuBar.addMenuItem("Layout", "Align Left", 1, "Ctrl L");
GuiEditorMenuBar.scriptCommand["Layout", 1] = "GuiEditor.Justify(0);";
GuiEditorMenuBar.addMenuItem("Layout", "Align Right", 2, "Ctrl R");
GuiEditorMenuBar.scriptCommand["Layout", 2] = "GuiEditor.Justify(2);";
GuiEditorMenuBar.addMenuItem("Layout", "Align Top", 3, "Ctrl T");
GuiEditorMenuBar.scriptCommand["Layout", 3] = "GuiEditor.Justify(3);";
GuiEditorMenuBar.addMenuItem("Layout", "Align Bottom", 4, "Ctrl B");
GuiEditorMenuBar.scriptCommand["Layout", 4] = "GuiEditor.Justify(4);";
GuiEditorMenuBar.addMenuItem("Layout", "-", 0);
GuiEditorMenuBar.addMenuItem("Layout", "Center Horizontally", 5);
GuiEditorMenuBar.scriptCommand["Layout", 5] = "GuiEditor.Justify(1);";
GuiEditorMenuBar.addMenuItem("Layout", "Space Vertically", 6);
GuiEditorMenuBar.scriptCommand["Layout", 6] = "GuiEditor.Justify(5);";
GuiEditorMenuBar.addMenuItem("Layout", "Space Horizontally", 7);
GuiEditorMenuBar.scriptCommand["Layout", 7] = "GuiEditor.Justify(6);";
GuiEditorMenuBar.addMenuItem("Layout", "-", 0);
GuiEditorMenuBar.addMenuItem("Layout", "Bring to Front", 8);
GuiEditorMenuBar.scriptCommand["Layout", 8] = "GuiEditor.BringToFront();";
GuiEditorMenuBar.addMenuItem("Layout", "Send to Back", 9);
GuiEditorMenuBar.scriptCommand["Layout", 9] = "GuiEditor.PushToBack();";
GuiEditorMenuBar.addMenu("Move", 3);
GuiEditorMenuBar.addMenuItem("Move", "Nudge Left", 1, "Left");
GuiEditorMenuBar.scriptCommand["Move", 1] = "GuiEditor.moveSelection(-1,0);";
GuiEditorMenuBar.addMenuItem("Move", "Nudge Right", 2, "Right");
GuiEditorMenuBar.scriptCommand["Move", 2] = "GuiEditor.moveSelection(1,0);";
GuiEditorMenuBar.addMenuItem("Move", "Nudge Up", 3, "Up");
GuiEditorMenuBar.scriptCommand["Move", 3] = "GuiEditor.moveSelection(0,-1);";
GuiEditorMenuBar.addMenuItem("Move", "Nudge Down", 4, "Down");
GuiEditorMenuBar.scriptCommand["Move", 4] = "GuiEditor.moveSelection(0,1);";
GuiEditorMenuBar.addMenuItem("Move", "-", 0);
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Left", 5, "Shift Left");
GuiEditorMenuBar.scriptCommand["Move", 5] = "GuiEditor.moveSelection(-10,0);";
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Right", 6, "Shift Right");
GuiEditorMenuBar.scriptCommand["Move", 6] = "GuiEditor.moveSelection(10,0);";
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Up", 7, "Shift Up");
GuiEditorMenuBar.scriptCommand["Move", 7] = "GuiEditor.moveSelection(0,-10);";
GuiEditorMenuBar.addMenuItem("Move", "Big Nudge Down", 8, "Shift Down");
GuiEditorMenuBar.scriptCommand["Move", 8] = "GuiEditor.moveSelection(0,10);";
Canvas.setContent(GuiEditorGui);
while((%obj = GuiEditorContent.getObject(0)) != -1)
GuiGroup.add(%obj); // get rid of anything being edited
%i = 0;
GuiEditorContentList.clear();
while((%obj = GuiGroup.getObject(%i)) != -1)
{
if(%obj.getName() !$= Canvas)
{
if(%obj.getName() $= "")
%name = "(unnamed) - " @ %obj;
else
%name = %obj.getName() @ " - " @ %obj;
GuiEditorContentList.add(%name, %obj);
}
%i++;
}
activatePackage(GuiEditor_BlockDialogs);
GuiEditorContent.add(%content);
deactivatePackage(GuiEditor_BlockDialogs);
GuiEditorContentList.sort();
GuiEditorClassPopup.sort();
GuiEditorResList.clear();
GuiEditorResList.add("640 x 480", 640);
GuiEditorResList.add("800 x 600", 800);
GuiEditorResList.add("1024 x 768", 1024);
%ext = GuiEditorRegion.getExtent();
switch(getWord(%ext, 0))
{
case 640:
GuiEditorResList.setText("640 x 480");
case 800:
GuiEditorResList.setText("800 x 600");
case 1024:
GuiEditorResList.setText("1024 x 768");
}
if(%content.getName() $= "")
%name = "(unnamed) - " @ %content;
else
%name = %content.getName() @ " - " @ %content;
GuiEditorContentList.setText(%name);
GuiEditorClassPopup.setText("New Control");
GuiEditor.setRoot(%content);
%content.resize(0,0,getWord(%ext,0), getWord(%ext, 1));
GuiEditorTreeView.open(%content);
}
function GuiEditorMenuBar::onMenuItemSelect(%this, %menuId, %menu, %itemId, %item)
{
if(%this.scriptCommand[%menu, %itemId] !$= "")
eval(%this.scriptCommand[%menu, %itemId]);
else
error("No script command defined for menu " @ %menu @ " item " @ %item);
}
//----------------------------------------
function GuiEditorContentList::onSelect(%this, %id)
{
GuiEditorOpen(%id);
}
//----------------------------------------
function GuiEditorClassPopup::onSelect(%this, %id)
{
%class = %this.getText();
%obj = eval("return new " @ %class @ "();");
GuiEditor.addNewCtrl(%obj);
GuiEditorClassPopup.setText("New Control");
}
function GuiEditorResList::onSelect(%this, %id)
{
switch(%id)
{
case 640:
GuiEditorRegion.resize(0,0,640,480);
GuiEditorContent.getObject(0).resize(0,0,640,480);
case 800:
GuiEditorRegion.resize(0,0,800,600);
GuiEditorContent.getObject(0).resize(0,0,800,600);
case 1024:
GuiEditorRegion.resize(0,0,1024,768);
GuiEditorContent.getObject(0).resize(0,0,1024,768);
}
}
//----------------------------------------
function GuiEditorTreeView::onSelect(%this, %obj, %rightMouse)
{
if(%rightMouse)
GuiEditor.setCurrentAddSet(%obj);
else
{
GuiEditorInspectFields.inspect(%obj);
GuiEditorInspectName.setValue(%obj.getName());
GuiEditor.select(%obj);
}
}
//----------------------------------------
function GuiEditorInspectApply()
{
GuiEditorInspectFields.apply(GuiEditorInspectName.getValue());
}
//----------------------------------------
function GuiEditor::onSelect(%this, %ctrl)
{
GuiEditorInspectFields.inspect(%ctrl);
GuiEditorInspectName.setValue(%ctrl.getName());
GuiEditor.select(%ctrl);
}
//----------------------------------------
function GuiEditorDeleteSelected( %val ) {
if( %val )
GuiEditor.deleteSelection();
}
GlobalActionMap.bind(keyboard, "f10", GuiEdit);

Binary file not shown.

View File

@ -0,0 +1,94 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(HelpDlg) {
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 = "75 36";
extent = "483 393";
minExtent = "300 200";
visible = "1";
helpTag = "0";
text = "Help";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
closeCommand = "Canvas.popDialog(HelpDlg);";
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "height";
position = "8 26";
extent = "132 356";
minExtent = "8 8";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "dynamic";
constantThumbHeight = "0";
childMargin = "0 0";
new GuiTextListCtrl(HelpFileList) {
profile = "GuiTextListProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "1 1";
extent = "130 8";
minExtent = "8 8";
visible = "1";
helpTag = "0";
enumerate = "0";
resizeCell = "1";
columns = "0";
fitParentWidth = "1";
clipColumnText = "0";
};
};
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "146 26";
extent = "328 356";
minExtent = "8 8";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "0 0";
new GuiMLTextCtrl(HelpText) {
profile = "GuiMLTextProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "1 1";
extent = "310 16";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,103 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(InspectAddFieldDlg) {
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 = "209 177";
extent = "221 125";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Add dynamic field...";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
closeCommand = "Canvas.popDialog(InspectAddFieldDlg);";
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "22 32";
extent = "30 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Name:";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "21 58";
extent = "31 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Value:";
};
new GuiTextEditCtrl(InspectAddFieldValue) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "62 58";
extent = "146 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
historySize = "0";
maxLength = "255";
};
new GuiTextEditCtrl(InspectAddFieldName) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "62 32";
extent = "146 18";
minExtent = "8 8";
visible = "1";
helpTag = "0";
historySize = "0";
maxLength = "255";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "25 88";
extent = "73 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "OK";
command = "canvas.popDialog(InspectAddFieldDlg);InspectAddFieldDlg.doAction();";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "125 88";
extent = "73 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "CANCEL";
command = "canvas.popDialog(InspectAddFieldDlg);";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,234 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(InspectDlg) {
profile = "GuiDialogProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "False";
helpTag = "0";
new GuiWindowCtrl(InspectTitle) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "20 20";
extent = "200 400";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
resizeWidth = "True";
resizeHeight = "True";
canMove = "True";
canClose = "True";
canMinimize = "True";
canMaximize = "True";
minSize = "50 50";
closeCommand = "Canvas.popDialog(InspectDlg);";
font = "12 244 Arial";
selectfillColor = "253";
fillColor = "250";
opaque = "true";
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "8 24";
extent = "40 16";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
command = "InspectApply();";
helpTag = "0";
text = "APPLY";
selectBorderColor = "255";
borderColor = "249";
fillColor = "249";
fontHL = "12 253 Arial";
font = "12 252 Arial";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "56 24";
extent = "29 18";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
text = "Name:";
font = "12 244 Arial";
};
new GuiTextEditCtrl(InspectObjectName) {
profile = "GuiTextEditProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "98 23";
extent = "72 18";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
historySize = "0";
};
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "8 44";
extent = "184 348";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
willFirstRespond = "True";
hScrollBar = "alwaysOff";
vScrollBar = "alwaysOn";
constantThumbHeight = "False";
new GuiInspector(InspectFields) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "184 8";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
};
};
};
new GuiWindowCtrl(InspectTreeTitle) {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "232 20";
extent = "200 400";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
text = "TREE VIEW";
resizeWidth = "True";
resizeHeight = "True";
canMove = "True";
canClose = "True";
canMinimize = "True";
canMaximize = "True";
minSize = "50 50";
closeCommand = "Canvas.popDialog(InspectDlg);";
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "width";
vertSizing = "height";
position = "8 24";
extent = "184 368";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
willFirstRespond = "True";
hScrollBar = "dynamic";
vScrollBar = "alwaysOn";
constantThumbHeight = "False";
new GuiTreeViewCtrl(InspectTreeView) {
profile = "GuiTreeViewProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = "64 64";
minExtent = "8 8";
visible = "True";
setFirstResponder = "False";
modal = "True";
helpTag = "0";
};
};
};
};
//--- OBJECT WRITE END ---
exec("./InspectAddFieldDlg.gui");
function Inspect(%obj)
{
Canvas.popDialog("InspectDlg");
Canvas.pushDialog("InspectDlg", 30);
InspectFields.inspect(%obj);
InspectObjectName.setValue(%obj.getName());
InspectTitle.setValue(%obj.getId() @ ": " @ %obj.getName());
}
function InspectApply()
{
InspectFields.apply(InspectObjectName.getValue());
}
function InspectTreeView::onSelect(%this, %obj)
{
Inspect(%obj);
}
function Tree(%obj)
{
Canvas.popDialog("InspectDlg");
Canvas.pushDialog("InspectDlg", 20);
InspectTreeView.open(%obj);
}
// MM: Added Dynamic group toggle support.
function GuiInspector::toggleDynamicGroupScript(%this, %obj)
{
%this.toggleDynamicGroupExpand();
%this.inspect(%obj);
}
// MM: Added group toggle support.
function GuiInspector::toggleGroupScript(%this, %obj, %fieldName)
{
%this.toggleGroupExpand(%obj, %fieldName);
%this.inspect(%obj);
}
// MM: Set All Group State support.
function GuiInspector::setAllGroupStateScript(%this, %obj, %groupState)
{
%this.setAllGroupState(%groupState);
%this.inspect(%obj);
}
function GuiInspector::addDynamicField(%this, %obj)
{
InspectAddFieldDlg.object = %obj;
InspectAddFieldDlg.inspector = %this;
InspectAddFieldName.setValue("");
InspectAddFieldValue.setValue("");
Canvas.pushDialog(InspectAddFieldDlg, 99);
}
function InspectAddFieldDlg::doAction(%this)
{
if(InspectAddFieldName.getValue() $= "" || InspectAddFieldValue.getValue() $= "")
return;
eval(%this.object @ "." @ firstWord(InspectAddFieldName.getValue()) @ " = " @ InspectAddFieldValue.getValue() @ ";");
%this.inspector.inspect(%this.object);
}

Binary file not shown.

View File

@ -0,0 +1,120 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(LoadFileDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "137 78";
extent = "578 326";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Load File...";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
closeCommand = "Canvas.popDialog(LoadFileDlg);";
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 26";
extent = "482 289";
minExtent = "8 8";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
defaultLineHeight = "15";
childMargin = "0 0";
new GuiTextListCtrl(loadFileList) {
profile = "GuiTextArrayProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "361 8";
minExtent = "8 8";
visible = "1";
altCommand = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);";
helpTag = "0";
enumerate = "0";
resizeCell = "1";
columns = "0";
fitParentWidth = "0";
clipColumnText = "0";
noDuplicates = "false";
};
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "503 268";
extent = "60 20";
minExtent = "8 8";
visible = "1";
command = "eval($loadFileCommand); Canvas.popDialog(LoadFileDlg);";
helpTag = "0";
text = "Load";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "503 294";
extent = "60 20";
minExtent = "8 8";
visible = "1";
command = "eval($loadFileCancelCommand); Canvas.popDialog(LoadFileDlg);";
helpTag = "0";
text = "Cancel";
};
};
};
//--- OBJECT WRITE END ---
function fillFileList(%filespec, %ctrl)
{
%ctrl.clear();
%i = 0;
%f = 0;
for(%fld = getField(%filespec, 0); %fld !$= ""; %fld = getField(%filespec, %f++))
{
for(%file = findFirstFile(%fld); %file !$= ""; %file = findNextFile(%fld))
if (getSubStr(%file, 0, 4) !$= "CVS/")
%ctrl.addRow(%i++, %file);
}
%ctrl.sort(0);
}
//------------------------------------------------------------------------------
// ex: getLoadFilename("stuff\*.*", loadStuff);
// -- calls 'loadStuff(%filename)' on dblclick or ok
//------------------------------------------------------------------------------
function getLoadFilename(%filespec, %callback)
{
$loadFileCommand = "if(loadFileList.getSelectedId() >= 0)" @ %callback @ "(loadFileList.getValue());";
$loadFileCancelCommand = "";
Canvas.pushDialog(LoadFileDlg, 99);
fillFileList(%filespec, loadFileList);
}

Binary file not shown.

View File

@ -0,0 +1,73 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(MessageBoxOKCancelDlg) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl(MBOKCancelFrame) {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "170 175";
extent = "300 129";
minExtent = "48 92";
visible = "1";
helpTag = "0";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiMLTextCtrl(MBOKCancelText) {
profile = "GuiTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "32 39";
extent = "236 24";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "158 88";
extent = "110 23";
minExtent = "8 8";
visible = "1";
command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.callback);";
accelerator = "return";
helpTag = "0";
text = "OK";
simpleStyle = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "30 88";
extent = "110 23";
minExtent = "8 8";
visible = "1";
command = "MessageCallback(MessageBoxOKCancelDlg,MessageBoxOKCancelDlg.cancelCallback);";
accelerator = "escape";
helpTag = "0";
text = "CANCEL";
simpleStyle = "0";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,61 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(MessageBoxOKDlg) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "800 600";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl(MBOKFrame) {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "330 248";
extent = "240 103";
minExtent = "48 92";
visible = "1";
helpTag = "0";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiMLTextCtrl(MBOKText) {
profile = "GuiTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "2 39";
extent = "236 14";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
new GuiButtonCtrl(MBOKButton) {
profile = "GuiButtonProfileBlue";
horizSizing = "right";
vertSizing = "top";
position = "95 67";
extent = "50 23";
minExtent = "8 8";
visible = "1";
command = "MessageCallback(MessageBoxOKDlg,MessageBoxOKDlg.callback);";
accelerator = "return";
helpTag = "0";
text = "OK";
groupNum = "-1";
buttonType = "PushButton";
simpleStyle = "0";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,77 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(MessageBoxYesNoDlg) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "800 600";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl(MBYesNoFrame) {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "250 235";
extent = "300 129";
minExtent = "48 92";
visible = "1";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
helpTag = "0";
new GuiMLTextCtrl(MBYesNoText) {
profile = "GuiTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "32 39";
extent = "236 14";
minExtent = "8 8";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
helpTag = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "213 88";
extent = "55 25";
minExtent = "8 8";
visible = "1";
command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.yesCallback);";
accelerator = "return";
text = "YES";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
simpleStyle = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "30 88";
extent = "55 25";
minExtent = "8 8";
visible = "1";
command = "MessageCallback(MessageBoxYesNoDlg,MessageBoxYesNoDlg.noCallback);";
accelerator = "escape";
text = "NO";
groupNum = "-1";
buttonType = "PushButton";
helpTag = "0";
simpleStyle = "0";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,45 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(MessagePopupDlg) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "640 480";
minExtent = "8 8";
visible = "1";
helpTag = "0";
new GuiWindowCtrl(MessagePopFrame) {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "170 175";
extent = "300 92";
minExtent = "48 92";
visible = "1";
helpTag = "0";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiMLTextCtrl(MessagePopText) {
profile = "GuiTextProfile";
horizSizing = "center";
vertSizing = "bottom";
position = "32 39";
extent = "236 24";
minExtent = "8 8";
visible = "1";
helpTag = "0";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,182 @@
// Profiles
new GuiControlProfile (NetGraphGhostsActiveProfile)
{
fontColor = "255 255 255";
};
new GuiControlProfile (NetGraphGhostUpdatesProfile)
{
fontColor = "255 0 0";
};
new GuiControlProfile (NetGraphBitsSentProfile)
{
fontColor = "0 255 0";
};
new GuiControlProfile (NetGraphBitsReceivedProfile)
{
fontColor = "0 0 255";
};
new GuiControlProfile (NetGraphLatencyProfile)
{
fontColor = "0 255 255";
};
new GuiControlProfile (NetGraphPacketLossProfile)
{
fontColor = "0 0 0";
};
//--- OBJECT WRITE BEGIN ---
new GuiControl(NetGraphGui) {
profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
noCursor = "1";
new GuiGraphCtrl(NetGraph) {
profile = "GuiDefaultProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "432 5";
extent = "200 200";
minExtent = "8 2";
visible = "1";
};
new GuiTextCtrl(Latency) {
profile = "NetGraphLatencyProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "436 184";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Latency";
maxLength = "255";
};
new GuiTextCtrl(PacketLoss) {
profile = "GuiTextProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "536 184";
extent = "59 18";
minExtent = "8 2";
visible = "1";
text = "Packet Loss";
maxLength = "255";
};
new GuiTextCtrl(BitsReceived) {
profile = "NetGraphBitsReceivedProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "536 170";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Bits Received";
maxLength = "255";
};
new GuiTextCtrl(GhostsActive) {
profile = "NetGraphGhostsActiveProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "436 156";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Ghosts Active";
maxLength = "255";
};
new GuiTextCtrl(GhostUpdates) {
profile = "NetGraphGhostUpdatesProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "536 156";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Ghost Updates";
maxLength = "255";
};
new GuiTextCtrl(BitsSent) {
profile = "NetGraphBitsSentProfile";
horizSizing = "left";
vertSizing = "bottom";
position = "436 170";
extent = "100 18";
minExtent = "8 2";
visible = "1";
text = "Bits Sent";
maxLength = "255";
};
};
//--- OBJECT WRITE END ---
// Functions
function NetGraph::toggleNetGraph()
{
if(!$NetGraph::isInitialized)
{
$Stats::netGhostUpdates = 0;
NetGraph::updateStats();
$NetGraph::isInitialized = true;
}
if(!Canvas.isMember(NetGraphGui))
{
Canvas.add(NetGraphGui);
}
else
Canvas.remove(NetGraphGui);
}
function NetGraph::updateStats()
{
$NetGraphThread = NetGraph.schedule(32, "updateStats");
if(!$Stats::netGhostUpdates)
return;
if(isobject(NetGraph))
{
if(isobject(ServerConnection))
NetGraph.addDatum(0,ServerConnection.getGhostsActive());
GhostsActive.setText("Ghosts Active: " @ ServerConnection.getGhostsActive());
NetGraph.addDatum(1,$Stats::netGhostUpdates);
GhostUpdates.setText("Ghost Updates: " @ $Stats::netGhostUpdates);
$Stats::netGhostUpdates = 0;
NetGraph.addDatum(2,$Stats::netBitsSent);
BitsSent.setText("Bits Sent: " @ $Stats::netBitsSent);
NetGraph.addDatum(3,$Stats::netBitsReceived);
BitsReceived.setText("Bits Received: " @ $Stats::netBitsReceived);
NetGraph.matchScale(2,3);
NetGraph.addDatum(4,ServerConnection.getPing());
Latency.setText("Latency: " @ ServerConnection.getPing());
NetGraph.addDatum(5,ServerConnection.getPacketLoss());
PacketLoss.setText("Packet Loss: " @ ServerConnection.getPacketLoss());
}
}
function NetGraph::toggleKey()
{
if(!GhostsActive.visible)
{
GhostsActive.visible = 1;
GhostUpdates.visible = 1;
BitsSent.visible = 1;
BitsReceived.visible = 1;
Latency.visible = 1;
PacketLoss.visible = 1;
}
else
{
GhostsActive.visible = 0;
GhostUpdates.visible = 0;
BitsSent.visible = 0;
BitsReceived.visible = 0;
Latency.visible = 0;
PacketLoss.visible = 0;
}
}

Binary file not shown.

View File

@ -0,0 +1,97 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(recordingsDlg) {
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 = "55 65";
extent = "530 338";
minExtent = "48 92";
visible = "1";
helpTag = "0";
text = "Demo Recordings";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
closeCommand = "Canvas.popDialog(recordingsDlg);";
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "23 37";
extent = "484 260";
minExtent = "32 32";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
childMargin = "0 0";
defaultLineHeight = "15";
new GuiTextListCtrl(RecordingsDlgList) {
profile = "GuiTextArrayProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "2 2";
extent = "462 20";
minExtent = "8 20";
visible = "1";
helpTag = "0";
enumerate = "0";
columns = "0";
resizeCell = "1";
fitParentWidth = "1";
clipColumnText = "0";
noDuplicates = "false";
};
};
new GuiButtonCtrl(DR_CancelBtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "396 306";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.popDialog(recordingsDlg);";
accelerator = "escape";
helpTag = "0";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl(DR_StartDemoBtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "top";
position = "25 305";
extent = "110 20";
minExtent = "8 8";
visible = "1";
command = "StartSelectedDemo();";
helpTag = "0";
text = "Play";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---

Binary file not shown.

View File

@ -0,0 +1,151 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(RegisterDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "139 133";
extent = "274 200";
minExtent = "8 2";
visible = "1";
text = "Register Torque2D";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextEditCtrl(REG_edit) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "28 119";
extent = "207 18";
minExtent = "8 2";
visible = "1";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "31 153";
extent = "85 30";
minExtent = "8 2";
visible = "1";
text = "Register";
groupNum = "-1";
buttonType = "PushButton";
command = "RegisterDlg.doRegister();";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "151 153";
extent = "85 30";
minExtent = "8 2";
visible = "1";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
command = "Canvas.popDialog(RegisterDlg);";
};
};
};
//--- OBJECT WRITE END ---
function RegisterDlg::doRegister(%this)
{
%ret = iRegisterProduct( REG_edit.getValue() );
if( %ret == 0 ) // Success
{
%this.regSucceed();
return;
}
else if( %ret == 1 ) // Wait
{
%status = iGetRegistrationStatus();
while( %status == 1 )
{
%status = iGetRegistrationStatus();
}
switch( %status )
{
case 0:
// Woot
%this.regSucceed();
return;
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
}
if( %errorString !$= "" )
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
else
{
Canvas.popDialog( %this );
}
}
else
{
switch( %ret )
{
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
case -1:
%errorString = "An unknown error has occured.";
}
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
}
function RegisterDlg::regSucceed(%this)
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
else
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
Canvas.popDialog( %this );
}

View File

@ -0,0 +1,278 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(RegisterDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
new GuiColouredBox(REG_Background) {
profile = "GuiDefaultProfile";
horizSizing = "width";
vertSizing = "height";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
color = "0 0 0 255";
color2 = "0 0 0 255";
opaque = "1";
gradientDir = "0";
};
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "264 74";
extent = "326 425";
minExtent = "8 2";
visible = "1";
text = "Register Torque ShowTool Pro";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextEditCtrl(REG_edit) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 349";
extent = "306 18";
minExtent = "8 2";
visible = "1";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "73 383";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "RegisterDlg.doRegister();";
text = "Register";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl(REG_CancelBut) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "173 383";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "Canvas.popDialog(RegisterDlg);";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiColouredBox() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 30";
extent = "306 256";
minExtent = "8 2";
visible = "1";
color = "255 255 255 255";
color2 = "0 0 0 255";
opaque = "1";
gradientDir = "0";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "25 0";
extent = "256 256";
minExtent = "8 2";
visible = "1";
bitmap = "./productlogo";
wrap = "0";
};
new GuiTextCtrl() {
profile = "GuiText24Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "96 177";
extent = "113 28";
minExtent = "8 2";
visible = "1";
text = "Registration";
maxLength = "255";
};
new GuiTextCtrl(REG_TryoutExp) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "65 215";
extent = "175 18";
minExtent = "8 2";
visible = "0";
text = "Your 30 day trial period has expired!";
maxLength = "255";
};
new GuiTextCtrl(REG_PleaseReg) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "75 215";
extent = "155 18";
minExtent = "8 2";
visible = "0";
text = "Please register your Ignition Key";
maxLength = "255";
};
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 330";
extent = "296 18";
minExtent = "8 2";
visible = "1";
text = "Please enter your Ignition Key as assigned by GarageGames:";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 300";
extent = "142 18";
minExtent = "8 2";
visible = "1";
text = "Your Off-Line Registration ID:";
maxLength = "255";
};
new GuiTextCtrl(REG_GUID) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "160 300";
extent = "101 18";
minExtent = "8 2";
visible = "1";
maxLength = "255";
};
};
};
//--- OBJECT WRITE END ---
function RegisterDlg::onWake(%this)
{
if($ThirtyDayOver == true)
{
REG_PleaseReg.setVisible(0);
REG_Background.setVisible(1);
} else
{
REG_TryoutExp.setVisible(0);
REG_Background.setVisible(0);
}
REG_GUID.setValue(iGetMachineGUID());
}
function RegisterDlg::doRegister(%this)
{
%ret = iRegisterProduct( REG_edit.getValue() );
if( %ret == 0 ) // Success
{
%this.regSucceed();
return;
}
else if( %ret == 1 ) // Wait
{
%status = iGetRegistrationStatus();
while( %status == 1 )
{
%status = iGetRegistrationStatus();
}
switch( %status )
{
case 0:
// Woot
%this.regSucceed();
return;
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
}
if( %errorString !$= "" )
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
else
{
Canvas.popDialog( %this );
}
}
else
{
switch( %ret )
{
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
case -1:
%errorString = "An unknown error has occured.";
}
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
}
function RegisterDlg::regSucceed(%this)
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
else
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
Canvas.popDialog( %this );
Canvas.popDialog( ThirtyDayTrialDlg ); //*** Also pop the 30-day dialog
//*** If the 30-day trial was up and only this dialog is visible, we need to bring back up
//*** the exporter interface
if($ThirtyDayOver == true)
{
startExporter();
}
}

View File

@ -0,0 +1,262 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(RegisterDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "237 87";
extent = "326 425";
minExtent = "8 2";
visible = "1";
text = "Register Torque ShowTool Pro";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "1";
canClose = "1";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiTextEditCtrl(REG_edit) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 349";
extent = "306 18";
minExtent = "8 2";
visible = "1";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
sinkAllKeyEvents = "0";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "73 383";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "RegisterDlg.doRegister();";
text = "Register";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiButtonCtrl(REG_CancelBut) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "173 383";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "Canvas.popDialog(RegisterDlg);";
text = "Cancel";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiColouredBox() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 30";
extent = "306 256";
minExtent = "8 2";
visible = "1";
color = "255 255 255 255";
color2 = "0 0 0 255";
opaque = "1";
gradientDir = "0";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "25 0";
extent = "256 256";
minExtent = "8 2";
visible = "1";
bitmap = "./productlogo";
wrap = "0";
};
new GuiTextCtrl() {
profile = "GuiText24Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "96 177";
extent = "113 28";
minExtent = "8 2";
visible = "1";
text = "Registration";
maxLength = "255";
};
new GuiTextCtrl(REG_TryoutExp) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "65 215";
extent = "175 18";
minExtent = "8 2";
visible = "0";
text = "Your 30 day trial period has expired!";
maxLength = "255";
};
new GuiTextCtrl(REG_PleaseReg) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "75 215";
extent = "155 18";
minExtent = "8 2";
visible = "1";
text = "Please register your Ignition Key";
maxLength = "255";
};
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 330";
extent = "296 18";
minExtent = "8 2";
visible = "1";
text = "Please enter your Ignition Key as assigned by GarageGames:";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 300";
extent = "142 18";
minExtent = "8 2";
visible = "1";
text = "Your Off-Line Registration ID:";
maxLength = "255";
};
new GuiTextCtrl(REG_GUID) {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "160 300";
extent = "157 18";
minExtent = "8 2";
visible = "1";
maxLength = "255";
};
};
};
//--- OBJECT WRITE END ---
function RegisterDlg::onWake(%this)
{
if($ThirtyDayOver == true)
{
REG_PleaseReg.setVisible(0);
} else
{
REG_TryoutExp.setVisible(0);
}
REG_GUID.setValue(iGetMachineGUID());
}
function RegisterDlg::doRegister(%this)
{
%ret = iRegisterProduct( REG_edit.getValue() );
if( %ret == 0 ) // Success
{
%this.regSucceed();
return;
}
else if( %ret == 1 ) // Wait
{
%status = iGetRegistrationStatus();
while( %status == 1 )
{
%status = iGetRegistrationStatus();
}
switch( %status )
{
case 0:
// Woot
%this.regSucceed();
return;
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
}
if( %errorString !$= "" )
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
else
{
Canvas.popDialog( %this );
}
}
else
{
switch( %ret )
{
case 2:
%errorString = "The key you have entered is invalid. Please make sure that your key appears exactly as it does in 'My Garage'.";
case 3:
%errorString = "This Ignition key has been disabled, please contact GarageGames for more information.";
case 4:
%errorString = "There was an error connecting to the Ignition server, please try again later. If this problem persists, please contact GarageGames.";
case 5:
%errorString = "The Ignition server has encountered an internal error, please try again later. If this problem persists, please contact GarageGames.";
case -1:
%errorString = "An unknown error has occured.";
}
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", %errorString );
else
MessageBoxOK( "Torque ShowTool Pro", %errorString );
}
}
function RegisterDlg::regSucceed(%this)
{
if( $UseSysMessageBox )
sysMessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
else
MessageBoxOK( "Torque ShowTool Pro", "Thank you for registering Torque ShowTool Pro " @ iGetUserName() );
Canvas.popDialog( %this );
Canvas.popDialog( ThirtyDayTrialDlg ); //*** Also pop the 30-day dialog
//*** If the 30-day trial was up and only this dialog is visible, we need to bring back up
//*** the exporter interface
if($ThirtyDayOver == true)
{
startExporter();
}
}

Binary file not shown.

View File

@ -0,0 +1,211 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(SaveFileDlg) {
profile = "GuiDialogProfile";
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 = "131 77";
extent = "378 326";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Save File...";
maxLength = "255";
resizeWidth = "1";
resizeHeight = "1";
canMove = "1";
canClose = "1";
canMinimize = "1";
canMaximize = "1";
minSize = "50 50";
closeCommand = "Canvas.popDialog(SaveFileDlg);";
new GuiPopUpMenuCtrl(SA_directoryList) {
profile = "GuiPopUpMenuProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "68 23";
extent = "226 19";
minExtent = "8 8";
visible = "1";
helpTag = "0";
maxLength = "255";
maxPopupHeight = "200";
};
new GuiScrollCtrl() {
profile = "GuiScrollProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 46";
extent = "285 248";
minExtent = "8 8";
visible = "1";
helpTag = "0";
willFirstRespond = "1";
hScrollBar = "dynamic";
vScrollBar = "alwaysOn";
constantThumbHeight = "0";
defaultLineHeight = "15";
childMargin = "0 0";
new GuiTextListCtrl(SA_fileList) {
profile = "GuiTextArrayProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "267 144";
minExtent = "8 8";
visible = "1";
altCommand = "doSACallback();";
helpTag = "0";
enumerate = "0";
resizeCell = "1";
columns = "0";
fitParentWidth = "1";
clipColumnText = "0";
noDuplicates = "false";
};
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "303 268";
extent = "60 20";
minExtent = "8 8";
visible = "1";
command = "doSACallback();";
helpTag = "0";
text = "Save";
};
new GuiButtonCtrl() {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "303 294";
extent = "60 20";
minExtent = "8 8";
visible = "1";
command = "Canvas.popDialog(SaveFileDlg);";
helpTag = "0";
text = "Cancel";
};
new GuiTextEditCtrl(SA_nameEdit) {
profile = "GuiTextEditProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "8 299";
extent = "286 16";
minExtent = "8 8";
visible = "1";
helpTag = "0";
maxLength = "255";
historySize = "0";
password = "0";
tabComplete = "0";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 21";
extent = "55 20";
minExtent = "8 8";
visible = "1";
helpTag = "0";
text = "Directory";
maxLength = "255";
};
};
};
//--- OBJECT WRITE END ---
//------------------------------------------------------------------------------
// ex: getSaveFilename("~/stuff/*.*", saveStuff);
// -- calls 'saveStuff(%filename)' on dblclick or ok
//------------------------------------------------------------------------------
function getSaveFilename(%filespec, %callback, %currentFile)
{
$SA_callback = %callback;
$SA_filespec = %filespec;
%hasPath = (filePath(%currentFile) $= "") ? false : true;
Canvas.pushDialog(SaveFileDlg, 99);
// Fill the Directory Drop Down
%i = 0;
%unique = 0;
SA_directoryList.clear();
for(%file = findFirstFile("*"); %file !$= ""; %file = findNextFile("*"))
if (strstr(%file, "/CVS/") == -1)
{
%path = filePath(%file);
if (!%unique[%path])
{
%i++;
%unique[%path] = %i;
SA_directoryList.add(%path, %i);
if (!%hasPath)
{
if (isFile(%path @ "/" @ %currentFile))
{
%currentFile = %path @ "/" @ %currentFile;
%hasPath = true;
}
}
}
}
SA_directoryList.sort();
// select the directory represented by current file
if ( %unique[filePath(%currentFile)] )
SA_directoryList.setSelected( %unique[filePath(%currentFile)] );
else
SA_directoryList.setSelected( 1 );
SA_nameEdit.setValue(fileName(%currentFile));
}
//--------------------------------------
function doSACallback()
{
if (SA_nameEdit.getValue() !$= "" && SA_directoryList.getValue() !$= "")
{
%file = SA_directoryList.getValue() @ "/" @ SA_nameEdit.getValue();
eval( $SA_callback @ "(\"" @ %file @"\");" );
}
Canvas.popDialog(SaveFileDlg);
}
//--------------------------------------
function SA_directoryList::onSelect(%this, %id)
{
// when a directory is selected put it's files in the file list
SA_fileList.clear();
%filespec = %this.getTextById(%id) @ "/" @ $SA_filespec;
for(%file = findFirstFile(%filespec); %file !$= ""; %file = findNextFile(%filespec))
if (strStr(%file, "/CVS/") == -1)
SA_fileList.addRow(%i++, fileName(%file));
SA_fileList.sort(0);
}
//--------------------------------------
function SA_filelist::onSelect(%this, %id)
{
// when a file is selected change the current filename
SA_nameEdit.setValue(%this.getRowTextById(%id));
}

Binary file not shown.

View File

@ -0,0 +1,83 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(ThirtyDayTrialDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "640 480";
minExtent = "8 2";
visible = "1";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "190 140";
extent = "259 200";
minExtent = "8 2";
visible = "1";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiButtonCtrl(TDT_regbtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "173 163";
extent = "79 30";
minExtent = "8 2";
visible = "1";
command = "ThirtyDayTrialDlg.pushRegisterBtn();";
text = "Register";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiMLTextCtrl(TDT_text) {
profile = "GuiMLTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "9 30";
extent = "244 123";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "";
};
new GuiButtonCtrl(TDT_ok) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "90 163";
extent = "79 30";
minExtent = "8 2";
visible = "1";
command = "ThirtyDayTrialDlg.pushOkBtn();";
text = "Ok";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---
function ThirtyDayTrialDlg::onWake(%this)
{
TDT_text.setText( wpbGetEvalDays() @ " out of " @ wpbGetMaxEvalDays() @ " days evaluated." );
}
function ThirtyDayTrialDlg::pushRegisterBtn(%this)
{
Canvas.pushDialog(RegisterDlg);
}
function ThirtyDayTrialDlg::pushOkBtn(%this)
{
}

View File

@ -0,0 +1,170 @@
//--- OBJECT WRITE BEGIN ---
new GuiControl(ThirtyDayTrialDlg) {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "0 0";
extent = "800 600";
minExtent = "8 2";
visible = "1";
new GuiWindowCtrl() {
profile = "GuiWindowProfile";
horizSizing = "center";
vertSizing = "center";
position = "237 110";
extent = "326 380";
minExtent = "8 2";
visible = "1";
maxLength = "255";
resizeWidth = "0";
resizeHeight = "0";
canMove = "0";
canClose = "0";
canMinimize = "0";
canMaximize = "0";
minSize = "50 50";
new GuiButtonCtrl(TDT_regbtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "123 338";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "ThirtyDayTrialDlg.pushRegisterBtn();";
text = "Register";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiMLTextCtrl(TDT_text) {
profile = "GuiMLTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 290";
extent = "244 14";
minExtent = "8 2";
visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
};
new GuiButtonCtrl(TDT_ok) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "33 338";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "ThirtyDayTrialDlg.pushOkBtn();";
text = "Ok";
groupNum = "-1";
buttonType = "PushButton";
};
new GuiColouredBox() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 30";
extent = "306 256";
minExtent = "8 2";
visible = "1";
color = "255 255 255 255";
color2 = "0 0 0 255";
opaque = "1";
gradientDir = "0";
new GuiBitmapCtrl() {
profile = "GuiDefaultProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "25 0";
extent = "256 256";
minExtent = "8 2";
visible = "1";
bitmap = "./productlogo";
wrap = "0";
};
new GuiTextCtrl() {
profile = "GuiText24Profile";
horizSizing = "right";
vertSizing = "bottom";
position = "85 175";
extent = "136 28";
minExtent = "8 2";
visible = "1";
text = "Tryout Version";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "36 205";
extent = "234 18";
minExtent = "8 2";
visible = "1";
text = "This tryout version will expire after a limited time.";
maxLength = "255";
};
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "46 225";
extent = "213 18";
minExtent = "8 2";
visible = "1";
text = "Purchase today at www.garagegames.com";
maxLength = "255";
};
};
new GuiProgressCtrl(TDT_progress) {
profile = "GuiProgressProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "10 308";
extent = "306 20";
minExtent = "8 2";
visible = "1";
};
new GuiButtonCtrl(TDT_purbtn) {
profile = "GuiButtonProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "213 338";
extent = "80 30";
minExtent = "8 2";
visible = "1";
command = "ThirtyDayTrialDlg.pushPurchaseBtn();";
text = "Purchase";
groupNum = "-1";
buttonType = "PushButton";
};
};
};
//--- OBJECT WRITE END ---
function ThirtyDayTrialDlg::onWake(%this)
{
TDT_text.setText( wpbGetEvalDays() @ " out of " @ wpbGetMaxEvalDays() @ " days evaluated." );
%percent = wpbGetEvalDays() / wpbGetMaxEvalDays();
TDT_progress.setValue( %percent );
}
function ThirtyDayTrialDlg::pushRegisterBtn(%this)
{
Canvas.pushDialog(RegisterDlg);
}
function ThirtyDayTrialDlg::pushPurchaseBtn(%this)
{
gotoWebPage("http://www.garagegames.com/pg/product/view.php?id=59");
}
function ThirtyDayTrialDlg::pushOkBtn(%this)
{
Canvas.popDialog(ThirtyDayTrialDlg);
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,15 @@
new SimSet(guiClipboard) {
new GuiTextCtrl() {
profile = "GuiTextProfile";
horizSizing = "right";
vertSizing = "bottom";
position = "126 180";
extent = "148 18";
minExtent = "8 2";
visible = "1";
command = "gotoWebPage(\"www.garagegames.com\");";
text = "Synapse Gaming Lighting Pack";
maxLength = "255";
};
};

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Some files were not shown because too many files have changed in this diff Show More