Torque3D/Templates/Modules/RPGDialog/Scripts/RPGDialogEditor/main.cs
Areloch f1777016b8 GFX card profile config file logging moved to debug only
WIP mode of guiSliderCtrl to be a filled rectangle instead of a textured UI
Fixed bug with guiTextEditCtrl losing focus updating history passing malformed strings
Updated WIP options menu
Editor/Project settings WIP
Updated editor theme to be consistent, and feed off the editor settings
Updated popup menus to reference renamed profiles
Added more in-progress modules for examples/stress testing
2019-06-17 02:30:45 -05:00

68 lines
2 KiB
C#

//-----------------------------------------------------------------------------
// Torque Game Engine
//
// Copyright (c) 2001 GarageGames.Com
// Portions Copyright (c) 2001 by Sierra Online, Inc.
//-----------------------------------------------------------------------------
function initEditor()
{
exec("~/scripts/RPGDialogEditor/ui/MainEditorScreenGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditQuestionGui.gui");
exec("~/scripts/RPGDialogEditor/ui/EditAnswerGui.gui");
exec("~/scripts/RPGDialogEditor/ui/NewScriptPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/SetPathsPopup.gui");
exec("~/scripts/RPGDialogEditor/ui/EditorOpeningGui.gui");
exec("~/scripts/RPGDialogEditor/defaults.cs");
exec("~/scripts/RPGDialogEditor/prefs.cs");
exec("~/scripts/RPGDialogEditor/editorMain.cs");
}
function startEditor()
{
// The client mod has already set it's own content, but we'll
// just load something new.
Canvas.setContent(EditorOpeningGui);
Canvas.setCursor("DefaultCursor");
PopulateActionList();
PopulateQuestionOptionsList();
}
//-----------------------------------------------------------------------------
// 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 RPGDialogEditor {
function onStart()
{
Parent::onStart();
echo("\n--------- Initializing MOD: RPGDialogEditor ---------");
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("RPGDialog Editor");
}
initEditor();
startEditor();
}
function onExit()
{
echo("Exporting RPGDialog editor prefs");
export("$RPGDialogEditorPref::*", "~/prefs.cs", False);
if(isEventPending($RPGDialog::RefreshSchedule))
cancel($RPGDialog::RefreshSchedule);
Parent::onExit();
}
}; // package end.
activatePackage(RPGDialogEditor);