added everything
This commit is contained in:
37
example/show/defaults.cs
Executable file
37
example/show/defaults.cs
Executable file
@ -0,0 +1,37 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
// Copyright (C) GarageGames.com, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$pref::shadows = "2";
|
||||
|
||||
$pref::Input::LinkMouseSensitivity = 1;
|
||||
$pref::Input::MouseEnabled = 0;
|
||||
$pref::Input::JoystickEnabled = 0;
|
||||
$pref::Input::KeyboardTurnSpeed = 0.1;
|
||||
|
||||
$pref::sceneLighting::cacheSize = 20000;
|
||||
$pref::sceneLighting::purgeMethod = "lastCreated";
|
||||
$pref::sceneLighting::cacheLighting = 1;
|
||||
$pref::sceneLighting::terrainGenerateLevel = 1;
|
||||
|
||||
$pref::Terrain::DynamicLights = 1;
|
||||
$pref::Interior::TexturedFog = 0;
|
||||
|
||||
$pref::Video::displayDevice = "OpenGL";
|
||||
$pref::Video::allowOpenGL = 1;
|
||||
$pref::Video::allowD3D = 1;
|
||||
$pref::Video::preferOpenGL = 1;
|
||||
$pref::Video::appliedPref = 0;
|
||||
$pref::Video::disableVerticalSync = 1;
|
||||
|
||||
$pref::OpenGL::force16BitTexture = "0";
|
||||
$pref::OpenGL::forcePalettedTexture = "0";
|
||||
$pref::OpenGL::maxHardwareLights = 3;
|
||||
$pref::VisibleDistanceMod = 1.0;
|
||||
|
||||
$pref::Audio::drivers = "";
|
||||
$pref::Audio::forceMaxDistanceUpdate = 0;
|
||||
$pref::Audio::environmentEnabled = 0;
|
||||
$pref::Audio::masterVolume = 0.8;
|
||||
|
140
example/show/main.cs
Executable file
140
example/show/main.cs
Executable file
@ -0,0 +1,140 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
// Copyright (C) GarageGames.com, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// Load up common script base
|
||||
loadDir("common");
|
||||
|
||||
// For the show tool to have access to shapes and art in your game,
|
||||
// it must be run as a mod on top of your game.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function initShow()
|
||||
{
|
||||
$showAutoDetail = false;
|
||||
|
||||
exec("~/ui/tsShowGui.gui");
|
||||
exec("~/ui/tsShowLoadDlg.gui");
|
||||
exec("~/ui/tsShowMiscDlg.gui");
|
||||
exec("~/ui/tsShowThreadControlDlg.gui");
|
||||
exec("~/ui/tsShowEditScale.gui");
|
||||
exec("~/ui/tsShowLightDlg.gui");
|
||||
exec("~/ui/tsShowTransitionDlg.gui");
|
||||
exec("~/ui/tsShowTranDurEditDlg.gui");
|
||||
exec("~/ui/tsShowDetailControlDlg.gui");
|
||||
|
||||
exec("~/scripts/show.bind.cs");
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function stopShow()
|
||||
{
|
||||
Canvas.popDialog(TSShowThreadControlDlg);
|
||||
Canvas.popDialog(TSShowTransitionDlg);
|
||||
Canvas.popDialog(TSShowLoadDialog);
|
||||
Canvas.popDialog(TSShowLightDlg);
|
||||
Canvas.popDialog(TSShowMiscDialog);
|
||||
Canvas.popDialog(TShowEditScale);
|
||||
Canvas.popDialog(TSShowDetailControlDlg);
|
||||
|
||||
showMoveMap.pop();
|
||||
quit();
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function startShow()
|
||||
{
|
||||
// The client mod has already set it's own content, but we'll
|
||||
// just load something new.
|
||||
Canvas.setContent(TSShowGui);
|
||||
Canvas.setCursor("DefaultCursor");
|
||||
|
||||
$showShapeList = nextToken(trim($showShapeList), shape, " ");
|
||||
while (%shape !$= "")
|
||||
{
|
||||
showShapeLoad(%shape);
|
||||
$showShapeList = nextToken($showShapeList, shape, " ");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Package overrides to initialize the mod.
|
||||
// This module currently loads on top of the client mod, but it probably
|
||||
// doesn't need to. Should look into having disabling the client and
|
||||
// doing our own canvas init.
|
||||
package Show {
|
||||
|
||||
function displayHelp() {
|
||||
Parent::displayHelp();
|
||||
error(
|
||||
"Show Mod options:\n"@
|
||||
" -show <shape> Launch the TS show tool\n"@
|
||||
" -file <shape> Load the mission\n"
|
||||
);
|
||||
}
|
||||
|
||||
function parseArgs()
|
||||
{
|
||||
Parent::parseArgs();
|
||||
exec("./defaults.cs");
|
||||
exec("./prefs.cs");
|
||||
|
||||
for (%i = 1; %i < $Game::argc ; %i++)
|
||||
{
|
||||
%arg = $Game::argv[%i];
|
||||
%nextArg = $Game::argv[%i+1];
|
||||
%hasNextArg = $Game::argc - %i > 1;
|
||||
|
||||
switch$ (%arg)
|
||||
{
|
||||
//-------------------
|
||||
case "-show":
|
||||
$argUsed[%i]++;
|
||||
// The "-mod show" shortcut can have an optional file argument
|
||||
if (%hasNextArg && strpos(%nextArg, "-") == -1)
|
||||
{
|
||||
$showShapeList = $showShapeList @ " " @ %nextArg;
|
||||
$argUsed[%i+1]++;
|
||||
%i++;
|
||||
}
|
||||
|
||||
//-------------------
|
||||
case "-file":
|
||||
// Load a file
|
||||
$argUsed[%i]++;
|
||||
if (%hasNextArg)
|
||||
{
|
||||
$showShapeList = $showShapeList @ " " @ %nextArg;
|
||||
$argUsed[%i+1]++;
|
||||
%i++;
|
||||
}
|
||||
else
|
||||
error("Error: Missing Command Line argument. Usage: -file <file_name>");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function onStart()
|
||||
{
|
||||
Parent::onStart();
|
||||
echo("\n--------- Initializing MOD: Show ---------");
|
||||
|
||||
if (!isObject(Canvas)) {
|
||||
// If the parent onStart didn't open a canvas, then we're
|
||||
// probably not running as a mod. We'll have to do the work
|
||||
// ourselves.
|
||||
initCanvas("Torque Show Tool");
|
||||
}
|
||||
initShow();
|
||||
startShow();
|
||||
}
|
||||
|
||||
}; // Show package
|
||||
activatePackage(Show);
|
90
example/show/scripts/show.bind.cs
Executable file
90
example/show/scripts/show.bind.cs
Executable file
@ -0,0 +1,90 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
// Copyright (C) GarageGames.com, Inc.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function showSetSpeed(%speed)
|
||||
{
|
||||
if(%speed)
|
||||
$showMovementSpeed = %speed;
|
||||
}
|
||||
|
||||
function showMoveleft(%val)
|
||||
{
|
||||
$showLeftAction = %val;
|
||||
}
|
||||
|
||||
function showMoveright(%val)
|
||||
{
|
||||
$showRightAction = %val;
|
||||
}
|
||||
|
||||
function showMoveforward(%val)
|
||||
{
|
||||
$showForwardAction = %val;
|
||||
}
|
||||
|
||||
function showMovebackward(%val)
|
||||
{
|
||||
$showBackwardAction = %val;
|
||||
}
|
||||
|
||||
function showMoveup(%val)
|
||||
{
|
||||
$showUpAction = %val;
|
||||
}
|
||||
|
||||
function showMovedown(%val)
|
||||
{
|
||||
$showDownAction = %val;
|
||||
}
|
||||
|
||||
function showYaw(%val)
|
||||
{
|
||||
$showYaw += %val * 0.01;
|
||||
}
|
||||
|
||||
function showPitch(%val)
|
||||
{
|
||||
$showPitch += %val * 0.01;
|
||||
}
|
||||
|
||||
function toggleMouse()
|
||||
{
|
||||
if(Canvas.isCursorOn())
|
||||
CursorOff();
|
||||
else
|
||||
CursorOn();
|
||||
}
|
||||
|
||||
new ActionMap(showMoveMap);
|
||||
showMoveMap.bind(keyboard, a, showMoveleft);
|
||||
showMoveMap.bind(keyboard, d, showMoveright);
|
||||
showMoveMap.bind(keyboard, w, showMoveforward);
|
||||
showMoveMap.bind(keyboard, s, showMovebackward);
|
||||
showMoveMap.bind(keyboard, e, showMoveup);
|
||||
showMoveMap.bind(keyboard, c, showMovedown);
|
||||
showMoveMap.bind(keyboard, z, showTurnLeft);
|
||||
showMoveMap.bind(keyboard, x, showTurnRight);
|
||||
|
||||
showMoveMap.bind(keyboard, 1, S, 0.10, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 2, S, 0.25, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 3, S, 0.50, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 4, S, 1.00, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 5, S, 1.50, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 6, S, 2.00, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 7, S, 3.00, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 8, S, 5.00, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 9, S, 10.00, showSetSpeed);
|
||||
showMoveMap.bind(keyboard, 0, S, 20.00, showSetSpeed);
|
||||
|
||||
showMoveMap.bind(mouse, xaxis, showYaw);
|
||||
showMoveMap.bind(mouse, yaxis, showPitch);
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Misc.
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
GlobalActionMap.bind(keyboard, "tilde", toggleConsole);
|
||||
GlobalActionMap.bindCmd(keyboard, "alt enter", "", "toggleFullScreen();");
|
137
example/show/ui/tsShowDetailControlDlg.gui
Executable file
137
example/show/ui/tsShowDetailControlDlg.gui
Executable file
@ -0,0 +1,137 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowDetailControlDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "False";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "195 259";
|
||||
extent = "220 140";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Detail Control";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(TSShowDetailControlDlg);";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "13 28";
|
||||
extent = "27 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "showToggleDetail();";
|
||||
helpTag = "0";
|
||||
text = "==>";
|
||||
};
|
||||
new GuiTextCtrl(showDetailInfoText1) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "16 89";
|
||||
extent = "184 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Slider Sets Detail";
|
||||
FONT = "12 244 Arial";
|
||||
justify = "center";
|
||||
};
|
||||
new GuiTextCtrl(showDetailInfoText2) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "16 112";
|
||||
extent = "184 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Slider Sets Detail";
|
||||
FONT = "12 244 Arial";
|
||||
justify = "center";
|
||||
};
|
||||
new GuiTextCtrl(showDetailText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "46 30";
|
||||
extent = "80 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Slider Sets Detail";
|
||||
FONT = "12 244 Arial";
|
||||
justify = "center";
|
||||
};
|
||||
new GuiSliderCtrl(showDetailSlider) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "16 57";
|
||||
extent = "153 23";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "value";
|
||||
helpTag = "0";
|
||||
range = "0.000000 1.000000";
|
||||
ticks = "5";
|
||||
value = "0";
|
||||
tab = "true";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
function showToggleDetail()
|
||||
{
|
||||
if ($showAutoDetail)
|
||||
{
|
||||
showDetailText.setValue("Slider Sets Detail Level");
|
||||
showSetDetailSlider();
|
||||
$showAutoDetail = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
showDetailText.setValue("Auto Detail Using Distance");
|
||||
$showAutoDetail = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
46
example/show/ui/tsShowEditScale.gui
Executable file
46
example/show/ui/tsShowEditScale.gui
Executable file
@ -0,0 +1,46 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowEditScale)
|
||||
{
|
||||
profile = "GuiDefaultProfile";
|
||||
|
||||
new GuiWindowCtrl()
|
||||
{
|
||||
profile = "GuiWindowProfile";
|
||||
position = "100 100";
|
||||
extent = "180 100";
|
||||
text = "Edit Scale";
|
||||
|
||||
new GuiTextEditCtrl(showScale)
|
||||
{
|
||||
profile = "GuiTextEditProfile";
|
||||
position = "80 20";
|
||||
extent = "50 20";
|
||||
altCommand = "showSetScale(threadList.getValue(),showScale.getValue()); Canvas.popDialog(TSShowEditScale);";
|
||||
};
|
||||
|
||||
new GuiButtonCtrl ()
|
||||
{
|
||||
profile = "GuiButtonProfile";
|
||||
position = "20 50";
|
||||
extent = "60 20";
|
||||
text = "Ok";
|
||||
command = "showSetScale(threadList.getValue(),showScale.getValue()); Canvas.popDialog(TSShowEditScale);";
|
||||
};
|
||||
|
||||
new GuiButtonCtrl ()
|
||||
{
|
||||
profile = "GuiButtonProfile";
|
||||
position = "110 50";
|
||||
extent = "60 20";
|
||||
text = "Cancel";
|
||||
command = "Canvas.popDialog(TSShowEditScale);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
147
example/show/ui/tsShowGui.gui
Executable file
147
example/show/ui/tsShowGui.gui
Executable file
@ -0,0 +1,147 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowGui) {
|
||||
profile = "GuiDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new ShowTSCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
helpTag = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 271";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "getLoadFilename(\"*.dts\", showShapeLoad);";
|
||||
helpTag = "0";
|
||||
text = "Load Shape";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 301";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "getLoadFilename(\"*.dsq\", showSequenceLoad);";
|
||||
helpTag = "0";
|
||||
text = "Load Sequence";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 361";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "Canvas.pushDialog(TSShowDetailControlDlg,99);";
|
||||
helpTag = "0";
|
||||
text = "Detail Control";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 390";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "Canvas.pushDialog(TSShowLightDlg,99);";
|
||||
helpTag = "0";
|
||||
text = "Lighting";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 420";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "Canvas.pushDialog(TSShowMiscDlg,99);";
|
||||
helpTag = "0";
|
||||
text = "Misc";
|
||||
};
|
||||
new GuiButtonCtrl(showExitButton) {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 450";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "stopShow();";
|
||||
helpTag = "0";
|
||||
text = "Quit";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 331";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
setFirstResponder = "0";
|
||||
modal = "1";
|
||||
command = "Canvas.pushDialog(TSShowThreadControlDlg,99); showUpdateThreadControl();";
|
||||
helpTag = "0";
|
||||
text = "Thread control";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
|
||||
function TSShowGui::onWake(%this)
|
||||
{
|
||||
GlobalActionMap.bindcmd(keyboard, "tab", "", "toggleMouse();");
|
||||
showMoveMap.push();
|
||||
}
|
||||
|
||||
function TSShowGui::onSleep(%this)
|
||||
{
|
||||
GlobalActionMap.unbind(keyboard, "tab");
|
||||
showMoveMap.pop();
|
||||
}
|
||||
|
||||
|
187
example/show/ui/tsShowLightDlg.gui
Executable file
187
example/show/ui/tsShowLightDlg.gui
Executable file
@ -0,0 +1,187 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl (TSShowLightDlg)
|
||||
{
|
||||
profile = "GuiDialogProfile";
|
||||
modal = false;
|
||||
|
||||
new GuiWindowCtrl()
|
||||
{
|
||||
profile = "GuiWindowProfile";
|
||||
closeCommand = "Canvas.popDialog(TSShowLightDlg);";
|
||||
position = "20 20";
|
||||
extent = "150 400";
|
||||
text = "Light Control";
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 30";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Environment mapping:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "emapAlpha")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 50";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.0;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 70";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Ambient Red:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "ambR")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 90";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 110";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Ambient Green:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "ambG")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 130";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 150";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Ambient Blue:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "ambB")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 170";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 190";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Directional Red:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "diffR")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 210";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 230";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Directional Green:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "diffG")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 250";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiTextCtrl()
|
||||
{
|
||||
profile = "GuiTextProfile";
|
||||
position = "20 270";
|
||||
extent = "50 16";
|
||||
font = "12 244 Arial";
|
||||
justify = "center";
|
||||
text = "Directional Blue:";
|
||||
};
|
||||
|
||||
new GuiSliderCtrl( "diffB")
|
||||
{
|
||||
profile = "GuiSliderProfile";
|
||||
position = "20 290";
|
||||
extent = "100 20";
|
||||
tab = "true";
|
||||
range = "0.0 1.0";
|
||||
value = 0.5;
|
||||
ticks = 5;
|
||||
};
|
||||
|
||||
new GuiButtonCtrl ()
|
||||
{
|
||||
profile = "GuiButtonProfile";
|
||||
position = "40 330";
|
||||
extent = "60 20";
|
||||
text = "Set Direction";
|
||||
command = "showSetLightDirection();";
|
||||
};
|
||||
|
||||
new GuiButtonCtrl ()
|
||||
{
|
||||
profile = "GuiButtonProfile";
|
||||
position = "40 360";
|
||||
extent = "60 20";
|
||||
text = "OK";
|
||||
command = "Canvas.popDialog(TSShowLightDlg);";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
118
example/show/ui/tsShowLoadDlg.gui
Executable file
118
example/show/ui/tsShowLoadDlg.gui
Executable file
@ -0,0 +1,118 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowLoadDlg) {
|
||||
profile = "GuiDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "100 100";
|
||||
extent = "180 240";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Load";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(TSShowLoadDlg);";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 35";
|
||||
extent = "140 160";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(showFileList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "64 64";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "eval($showFileCommand); Canvas.popDialog(TSShowLoadDlg);";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 205";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "eval($showFileCommand); Canvas.popDialog(TSShowLoadDlg);";
|
||||
helpTag = "0";
|
||||
text = "Load";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "100 205";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(TSShowLoadDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
||||
function foobar(%file)
|
||||
{
|
||||
echo ("TODO LOAD " @ %file);
|
||||
}
|
||||
|
||||
function TSShowLoadDlg::onWake(%this)
|
||||
{
|
||||
%filespec = "*.cs";
|
||||
getLoadFilename(%filespec, foobar);
|
||||
}
|
||||
|
127
example/show/ui/tsShowMiscDlg.gui
Executable file
127
example/show/ui/tsShowMiscDlg.gui
Executable file
@ -0,0 +1,127 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowMiscDlg) {
|
||||
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() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "140 220";
|
||||
extent = "190 240";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Misc";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(TSShowMiscDlg);";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 30";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showToggleRoot();";
|
||||
helpTag = "0";
|
||||
text = "Toggle Animate Ground";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 65";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showToggleStick();";
|
||||
helpTag = "0";
|
||||
text = "Toggle Stick To Ground";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 100";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showSetKeyboard(true); showSetCamera(true);";
|
||||
helpTag = "0";
|
||||
text = "Keyboard Controls Shape";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 135";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showSetKeyboard(false);";
|
||||
helpTag = "0";
|
||||
text = "Keyboard Controls Camera";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 170";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showSetCamera(true); showSetKeyboard(false);";
|
||||
helpTag = "0";
|
||||
text = "Camera Orbits Shape";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "20 205";
|
||||
extent = "150 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showSetCamera(false); showSetKeyboard(false);";
|
||||
helpTag = "0";
|
||||
text = "Camera Moves Freely";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
268
example/show/ui/tsShowThreadControlDlg.gui
Executable file
268
example/show/ui/tsShowThreadControlDlg.gui
Executable file
@ -0,0 +1,268 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowThreadControlDlg) {
|
||||
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() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "451 403";
|
||||
extent = "327 187";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Thread Control";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(TSShowThreadControlDlg);";
|
||||
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 30";
|
||||
extent = "42 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Threads:";
|
||||
FONT = "12 244 Arial";
|
||||
justify = "center";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 50";
|
||||
extent = "50 100";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "False";
|
||||
|
||||
new GuiTextListCtrl(threadList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "50 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showUpdateThreadControl();";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "90 30";
|
||||
extent = "57 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Sequences:";
|
||||
FONT = "12 244 Arial";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
profile = "GuiScrollProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "60 50";
|
||||
extent = "150 100";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
willFirstRespond = "True";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
constantThumbHeight = "False";
|
||||
text = "Sequences:";
|
||||
|
||||
new GuiTextListCtrl(sequenceList) {
|
||||
profile = "GuiTextArrayProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "150 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showSelectSequence();";
|
||||
altCommand = "showSelectSequence();";
|
||||
helpTag = "0";
|
||||
enumerate = "False";
|
||||
resizeCell = "True";
|
||||
columns = "0";
|
||||
noDuplicates = "false";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 27";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showPlay(threadList.getValue());";
|
||||
helpTag = "0";
|
||||
text = "Play";
|
||||
};
|
||||
new GuiTextCtrl(showScaleValue) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "133 162";
|
||||
extent = "8 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
FONT = "12 244 Arial";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 47";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showStop(threadList.getValue());";
|
||||
helpTag = "0";
|
||||
text = "Stop";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 79";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(TSShowTransitionDlg,199);";
|
||||
helpTag = "0";
|
||||
text = "Transition...";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 110";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showNewThread();";
|
||||
helpTag = "0";
|
||||
text = "New Thread";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 129";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showDeleteThread(threadList.getValue());";
|
||||
helpTag = "0";
|
||||
text = "Delete Thread";
|
||||
};
|
||||
new GuiSliderCtrl(threadPosition) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "27 160";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "value";
|
||||
helpTag = "0";
|
||||
range = "0.000000 1.000000";
|
||||
ticks = "5";
|
||||
value = "0";
|
||||
tab = "true";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "230 161";
|
||||
extent = "84 16";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "showScale.setText(\"\"); Canvas.pushDialog(TSShowEditScale,199);";
|
||||
helpTag = "0";
|
||||
text = "Edit Scale";
|
||||
};
|
||||
new GuiTextCtrl(transitionSignal) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "10 162";
|
||||
extent = "8 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
84
example/show/ui/tsShowTranDurEditDlg.gui
Executable file
84
example/show/ui/tsShowTranDurEditDlg.gui
Executable file
@ -0,0 +1,84 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowTranDurEditDlg) {
|
||||
profile = "GuiDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "260 425";
|
||||
extent = "181 87";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Edit Transition Duration";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
|
||||
new GuiTextEditCtrl(showTransitionDuration) {
|
||||
profile = "GuiTextEditProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "24 25";
|
||||
extent = "50 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
altCommand = "$showTransitionDuration = showTransitionDuration.getValue(); transitionDurationText.setValue($showTransitionDuration); Canvas.popDialog(TSShowTranDurEditDlg);";
|
||||
helpTag = "0";
|
||||
historySize = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "100 27";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "$showTransitionDuration = showTransitionDuration.getValue(); transitionDurationText.setValue($showTransitionDuration); Canvas.popDialog(TSShowTranDurEditDlg);";
|
||||
helpTag = "0";
|
||||
text = "Ok";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "100 54";
|
||||
extent = "60 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
command = "Canvas.popDialog(TSShowTranDurEditDlg);";
|
||||
helpTag = "0";
|
||||
text = "Cancel";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
234
example/show/ui/tsShowTransitionDlg.gui
Executable file
234
example/show/ui/tsShowTransitionDlg.gui
Executable file
@ -0,0 +1,234 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Torque Game Engine
|
||||
//
|
||||
// Copyright (c) 2001 GarageGames.Com
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiControl(TSShowTransitionDlg) {
|
||||
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() {
|
||||
profile = "GuiWindowProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "6 378";
|
||||
extent = "249 195";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Transition Control";
|
||||
resizeWidth = "True";
|
||||
resizeHeight = "True";
|
||||
canMove = "True";
|
||||
canClose = "True";
|
||||
canMinimize = "True";
|
||||
canMaximize = "True";
|
||||
minSize = "50 50";
|
||||
closeCommand = "Canvas.popDialog(TSShowTransitionDlg);";
|
||||
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "13 28";
|
||||
extent = "27 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "showToggleTransition();";
|
||||
helpTag = "0";
|
||||
text = "==>";
|
||||
};
|
||||
new GuiTextCtrl(showTransitionToText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "46 30";
|
||||
extent = "67 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Set Sequence";
|
||||
justify = "center";
|
||||
FONT = "12 244 Arial";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "13 56";
|
||||
extent = "27 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "showToggleTransitionPos();";
|
||||
helpTag = "0";
|
||||
text = "==>";
|
||||
};
|
||||
new GuiTextCtrl(showTransitionPosText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "46 58";
|
||||
extent = "147 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Transition To Synched Position";
|
||||
justify = "center";
|
||||
FONT = "12 244 Arial";
|
||||
};
|
||||
new GuiSliderCtrl(transitionPosition) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "47 125";
|
||||
extent = "100 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
variable = "value";
|
||||
helpTag = "0";
|
||||
range = "0.000000 1.000000";
|
||||
ticks = "5";
|
||||
value = "0";
|
||||
tab = "true";
|
||||
};
|
||||
new GuiTextCtrl(transitionDurationText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "132 170";
|
||||
extent = "14 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "0.2";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "15 159";
|
||||
extent = "85 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "Canvas.pushDialog(TSShowTranDurEditDlg);";
|
||||
helpTag = "0";
|
||||
text = "Edit Duration";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "119 152";
|
||||
extent = "42 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Duration:";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "13 87";
|
||||
extent = "27 20";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
command = "showToggleTransitionTargetPlay();";
|
||||
helpTag = "0";
|
||||
text = "==>";
|
||||
};
|
||||
new GuiTextCtrl(showTransitionTargetPlayText) {
|
||||
profile = "GuiTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "46 89";
|
||||
extent = "190 18";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "False";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
text = "Target sequence plays during transition";
|
||||
FONT = "12 244 Arial";
|
||||
justify = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
$showTransition = false;
|
||||
$showTransitionSynched = true;
|
||||
$showTransitionDuration = 0.2;
|
||||
$showTransitionTargetPlay = true;
|
||||
|
||||
function showToggleTransitionTargetPlay()
|
||||
{
|
||||
if ($showTransitionTargetPlay)
|
||||
{
|
||||
showTransitionTargetPlayText.setValue("Target sequence pauses during transition");
|
||||
$showTransitionTargetPlay = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
showTransitionTargetPlayText.setValue("Target sequence plays during transition");
|
||||
$showTransitionTargetPlay = true;
|
||||
}
|
||||
}
|
||||
|
||||
function showToggleTransition()
|
||||
{
|
||||
if ($showTransition)
|
||||
{
|
||||
showTransitionToText.setValue("Set Sequence");
|
||||
$showTransition=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
showTransitionToText.setValue("Transition To Sequence");
|
||||
$showTransition=true;
|
||||
}
|
||||
}
|
||||
|
||||
function showToggleTransitionPos()
|
||||
{
|
||||
if ($showTransitionSynched)
|
||||
{
|
||||
showTransitionPosText.setValue("Transition to Slider Position");
|
||||
$showTransitionSynched=false;
|
||||
}
|
||||
else
|
||||
{
|
||||
showTransitionPosText.setValue("Transition To Synched Position");
|
||||
$showTransitionSynched=true;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user