Merge branch 'Preview4_0_DevHead' into tsneo
14
Templates/BaseGame/game/data/UI/UI.module
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<ModuleDefinition
|
||||
ModuleId="UI"
|
||||
VersionId="1"
|
||||
Description="Module that implements the menus for the game."
|
||||
ScriptFile="UI"
|
||||
CreateFunction="onCreate"
|
||||
DestroyFunction="onDestroy"
|
||||
Group="Game">
|
||||
<DeclaredAssets
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
Extension="asset.taml"
|
||||
Recurse="true" />
|
||||
</ModuleDefinition>
|
||||
86
Templates/BaseGame/game/data/UI/UI.tscript
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
|
||||
// The general flow of a gane - server's creation, loading and hosting clients, and then destruction is as follows:
|
||||
|
||||
// First, a client will always create a server in the event that they want to host a single player
|
||||
// game. Torque3D treats even single player connections as a soft multiplayer game, with some stuff
|
||||
// in the networking short-circuited to sidestep around lag and packet transmission times.
|
||||
|
||||
// initServer() is called, loading the default server scripts.
|
||||
// After that, if this is a dedicated server session, initDedicated() is called, otherwise initClient is called
|
||||
// to prep a playable client session.
|
||||
|
||||
// When a local game is started - a listen server - via calling StartGame() a server is created and then the client is
|
||||
// connected to it via createAndConnectToLocalServer().
|
||||
|
||||
function UI::onCreate( %this )
|
||||
{
|
||||
}
|
||||
|
||||
function UI::onDestroy( %this )
|
||||
{
|
||||
}
|
||||
|
||||
function UI::initServer(%this){}
|
||||
|
||||
function UI::onCreateGameServer(%this){}
|
||||
|
||||
function UI::onDestroyGameServer(%this){}
|
||||
|
||||
function UI::initClient(%this)
|
||||
{
|
||||
//Load UI stuff
|
||||
//we need to load this because some of the menu profiles use the sounds here
|
||||
//%this.queueExec("./datablocks/guiSounds");
|
||||
|
||||
//Profiles
|
||||
%this.queueExec("./scripts/profiles");
|
||||
|
||||
//Now gui files
|
||||
%this.queueExec("./scripts/menuInputButtons");
|
||||
|
||||
%this.queueExec("./guis/mainMenu");
|
||||
%this.queueExec("./guis/mainMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/chooseLevelDlg");
|
||||
%this.queueExec("./guis/chooseLevelDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/joinServerMenu");
|
||||
%this.queueExec("./guis/joinServerMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/loadingGui.gui");
|
||||
|
||||
%this.queueExec("./guis/optionsMenu");
|
||||
%this.queueExec("./guis/optionsMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/pauseMenu");
|
||||
%this.queueExec("./guis/pauseMenu.gui");
|
||||
|
||||
%this.queueExec("./guis/remapDlg.gui");
|
||||
%this.queueExec("./guis/remapConfirmDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/profiler");
|
||||
%this.queueExec("./guis/profiler.gui");
|
||||
|
||||
%this.queueExec("./guis/netGraphGui.gui");
|
||||
%this.queueExec("./guis/RecordingsDlg.gui");
|
||||
|
||||
%this.queueExec("./guis/guiMusicPlayer");
|
||||
%this.queueExec("./guis/guiMusicPlayer.gui");
|
||||
|
||||
%this.queueExec("./guis/startupGui");
|
||||
%this.queueExec("./guis/startupGui.gui");
|
||||
|
||||
// Load Editor Dialogs
|
||||
%this.queueExec("./guis/messageBoxDlg.gui");
|
||||
|
||||
//Load scripts
|
||||
%this.queueExec("./scripts/controlsMenu");
|
||||
%this.queueExec("./scripts/messageBoxes");
|
||||
%this.queueExec("./scripts/help");
|
||||
%this.queueExec("./scripts/cursors");
|
||||
%this.queueExec("./scripts/utility");
|
||||
}
|
||||
|
||||
function UI::onCreateClientConnection(%this){}
|
||||
|
||||
function UI::onDestroyClientConnection(%this){}
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
<ScriptAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="guiSounds"
|
||||
scriptFile="@assetFile=guiSounds.cs"
|
||||
VersionId="1" />
|
||||
34
Templates/BaseGame/game/data/UI/datablocks/guiSounds.tscript
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
singleton SFXProfile(menuButtonPressed)
|
||||
{
|
||||
preload = true;
|
||||
description = AudioGui;
|
||||
fileName = "data/ui/sounds/buttonClick";
|
||||
};
|
||||
|
||||
singleton SFXProfile(menuButtonHover)
|
||||
{
|
||||
preload = true;
|
||||
description = AudioGui;
|
||||
fileName = "data/ui/sounds/buttonHover";
|
||||
};
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ChooseLevelDlg"
|
||||
scriptFile="@assetFile=chooseLevelDlg.gui"
|
||||
GUIFile="@assetFile=chooseLevelDlg.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="GuiMusicPlayer"
|
||||
scriptFile="@assetFile=guiMusicPlayer.gui"
|
||||
GUIFile="@assetFile=guiMusicPlayer.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="IODropdownDlg"
|
||||
scriptFile="@assetFile=IODropdownDlg.ed.gui"
|
||||
GUIFile="@assetFile=IODropdownDlg.ed.gui"
|
||||
VersionId="1" />
|
||||
159
Templates/BaseGame/game/data/UI/guis/IODropdownDlg.ed.gui
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(IODropdownDlg) {
|
||||
profile = "GuiDefaultProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
new GuiWindowCtrl(IODropdownFrame) {
|
||||
canSaveDynamicFields = "0";
|
||||
Profile = "GuiWindowProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
position = "272 77";
|
||||
extent = "256 117";
|
||||
minExtent = "256 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
hovertime = "1000";
|
||||
maxLength = "255";
|
||||
resizeWidth = "1";
|
||||
resizeHeight = "1";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
minSize = "50 50";
|
||||
text = "";
|
||||
closeCommand="IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);";
|
||||
|
||||
new GuiMLTextCtrl(IODropdownText) {
|
||||
text = "";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiMLTextProfile";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
position = "9 26";
|
||||
extent = "237 16";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBorderCtrl() {
|
||||
isContainer = "0";
|
||||
profile = "GuiGroupBorderProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "7 51";
|
||||
extent = "243 28";
|
||||
minExtent = "0 0";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl(IOInputText) {
|
||||
text = "Decal Datablock";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiTextRightProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 5";
|
||||
extent = "105 18";
|
||||
minExtent = "8 2";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiPopUpMenuCtrl(IODropdownMenu) {
|
||||
maxPopupHeight = "200";
|
||||
sbUsesNAColor = "0";
|
||||
reverseTextList = "0";
|
||||
bitmapBounds = "16 16";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiPopUpMenuProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
position = "115 5";
|
||||
extent = "122 18";
|
||||
minExtent = "8 2";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "width";
|
||||
vertSizing = "top";
|
||||
position = "7 85";
|
||||
extent = "156 24";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
accelerator = "return";
|
||||
command = "IOCallback(IODropdownDlg,IODropdownDlg.callback);";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
profile = "GuiButtonProfile";
|
||||
horizSizing = "left";
|
||||
vertSizing = "top";
|
||||
position = "170 85";
|
||||
extent = "80 24";
|
||||
minExtent = "8 8";
|
||||
canSave = "1";
|
||||
visible = "1";
|
||||
accelerator = "escape";
|
||||
command = "IOCallback(IODropdownDlg,IODropdownDlg.cancelCallback);";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="JoinServerMenu"
|
||||
scriptFile="@assetFile=joinServerMenu.gui"
|
||||
GUIFile="@assetFile=joinServerMenu.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="LoadingGui"
|
||||
scriptFile="@assetFile=loadingGui.gui"
|
||||
GUIFile="@assetFile=loadingGui.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="MainMenuGui"
|
||||
scriptFile="@assetFile=mainMenu.gui"
|
||||
GUIFile="@assetFile=mainMenu.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="MessageBoxDlg"
|
||||
scriptFile="@assetFile=messageBoxDlg.gui"
|
||||
GUIFile="@assetFile=messageBoxDlg.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="NetGraphProfile"
|
||||
scriptFile="@assetFile=netGraphGui.gui"
|
||||
GUIFile="@assetFile=netGraphGui.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="OptionsDlg"
|
||||
scriptFile="@assetFile=optionsDlg.gui"
|
||||
GUIFile="@assetFile=optionsDlg.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="OptionsMenu"
|
||||
scriptFile="@assetFile=optionsMenu.gui"
|
||||
GUIFile="@assetFile=optionsMenu.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="PauseMenu"
|
||||
scriptFile="@assetFile=pauseMenu.gui"
|
||||
GUIFile="@assetFile=pauseMenu.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="ProfilerGui"
|
||||
scriptFile="@assetFile=profiler.gui"
|
||||
GUIFile="@assetFile=profiler.gui"
|
||||
VersionId="1" />
|
||||
230
Templates/BaseGame/game/data/UI/guis/RecordingsDlg.gui
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(recordingsDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
text = "Demo Recordings";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
canCollapse = "0";
|
||||
closeCommand = "Canvas.popDialog(recordingsDlg);";
|
||||
edgeSnap = "1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "247 215";
|
||||
extent = "530 338";
|
||||
minExtent = "48 92";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiWindowProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "23 60";
|
||||
extent = "484 237";
|
||||
minExtent = "32 32";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextListCtrl(RecordingsDlgList) {
|
||||
columns = "0";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
position = "1 1";
|
||||
extent = "469 32";
|
||||
minExtent = "8 20";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextArrayProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl(DR_CancelBtn) {
|
||||
text = "Cancel";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "396 306";
|
||||
extent = "110 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "Canvas.popDialog(recordingsDlg);";
|
||||
accelerator = "escape";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(DR_StartDemoBtn) {
|
||||
text = "Play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "25 305";
|
||||
extent = "110 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "StartSelectedDemo();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "During gameplay press the following keys:";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "23 30";
|
||||
extent = "206 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Start = F3";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "253 32";
|
||||
extent = "50 15";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Stop = F4";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "320 32";
|
||||
extent = "49 13";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(DR_DelDemoBtn) {
|
||||
text = "Delete";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "210 305";
|
||||
extent = "110 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "deleteDemoRecord();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="RemapConfirmDlg"
|
||||
scriptFile="@assetFile=remapConfirmDlg.gui"
|
||||
GUIFile="@assetFile=remapConfirmDlg.gui"
|
||||
VersionId="1" />
|
||||
7
Templates/BaseGame/game/data/UI/guis/RemapDlg.asset.taml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="RemapDlg"
|
||||
scriptFile="@assetFile=remapDlg.gui"
|
||||
GUIFile="@assetFile=remapDlg.gui"
|
||||
VersionId="1" />
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="StartupGui"
|
||||
scriptFile="@assetFile=startupGui.gui"
|
||||
GUIFile="@assetFile=startupGui.gui"
|
||||
VersionId="1" />
|
||||
314
Templates/BaseGame/game/data/UI/guis/chooseLevelDlg.gui
Normal file
|
|
@ -0,0 +1,314 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(ChooseLevelDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
launchInEditor = "0";
|
||||
returnGui = "MainMenuGui";
|
||||
|
||||
new GuiControl(ChooseLevelWindow) {
|
||||
position = "48 56";
|
||||
extent = "928 655";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 0";
|
||||
extent = "927 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(LevelSelectTitle) {
|
||||
text = "SINGLE PLAYER";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "22 10";
|
||||
extent = "307 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel_low.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 40";
|
||||
extent = "927 618";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapCtrl() {
|
||||
bitmapAsset = "UI:no_preview_image";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "513 71";
|
||||
extent = "400 300";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "CurrentPreview";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Example Level";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "514 375";
|
||||
extent = "398 27";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "LevelName";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Description:";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "522 410";
|
||||
extent = "91 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuSubHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "LevelDescriptionLabel";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "This is placeholder text";
|
||||
useURLMouseCursor = "0";
|
||||
position = "522 436";
|
||||
extent = "391 14";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "LevelDescription";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 40";
|
||||
extent = "450 580";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiGameListMenuCtrl(LevelList) {
|
||||
debugRender = "0";
|
||||
callbackOnInputs = "1";
|
||||
position = "1 1";
|
||||
extent = "450 90";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "DefaultListMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
class = "UIMenuButtonList";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiControl(ChooseLevelButtonHolder) {
|
||||
position = "189 711";
|
||||
extent = "646 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "./";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "363 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "goButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "./";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Back";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "backButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
211
Templates/BaseGame/game/data/UI/guis/chooseLevelDlg.tscript
Normal file
|
|
@ -0,0 +1,211 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//----------------------------------------
|
||||
function ChooseLevelDlg::onWake( %this )
|
||||
{
|
||||
if(!isObject(LevelListEntries))
|
||||
new ArrayObject(LevelListEntries){};
|
||||
|
||||
LevelList.clearRows();
|
||||
LevelListEntries.empty();
|
||||
|
||||
ChooseLevelWindow->CurrentPreview.setBitmap("data/ui/images/no-preview");
|
||||
ChooseLevelWindow->LevelDescriptionLabel.visible = false;
|
||||
ChooseLevelWindow->LevelDescription.visible = false;
|
||||
|
||||
%assetQuery = new AssetQuery();
|
||||
AssetDatabase.findAssetType(%assetQuery, "LevelAsset");
|
||||
|
||||
%count = %assetQuery.getCount();
|
||||
|
||||
if(%count == 0 && !IsDirectory("tools"))
|
||||
{
|
||||
//We have no levels found. Prompt the user to open the editor to the default level if the tools are present
|
||||
MessageBoxOK("Error", "No levels were found in any modules. Please ensure you have modules loaded that contain gameplay code and level files.",
|
||||
"Canvas.popDialog(ChooseLevelDlg); if(isObject(ChooseLevelDlg.returnGui) && ChooseLevelDlg.returnGui.isMethod(\"onReturnTo\")) ChooseLevelDlg.returnGui.onReturnTo();");
|
||||
|
||||
%assetQuery.delete();
|
||||
return;
|
||||
}
|
||||
|
||||
for(%i=0; %i < %count; %i++)
|
||||
{
|
||||
%assetId = %assetQuery.getAsset(%i);
|
||||
|
||||
if(AssetDatabase.getAssetModule(%assetId).ModuleId $= "ToolsModule")
|
||||
continue;
|
||||
|
||||
%levelAsset = AssetDatabase.acquireAsset(%assetId);
|
||||
|
||||
%file = %levelAsset.getLevelPath();
|
||||
|
||||
if ( !isFile(%file @ ".mis") && !isFile(%file @ ".mis.dso") &&!isFile(%file) )
|
||||
continue;
|
||||
|
||||
// Skip our new level/mission if we arent choosing a level
|
||||
// to launch in the editor.
|
||||
if ( !%this.launchInEditor )
|
||||
{
|
||||
%fileName = fileName(%file);
|
||||
if (strstr(%fileName, "newMission.mis") > -1 || strstr(%fileName, "newLevel.mis") > -1)
|
||||
continue;
|
||||
}
|
||||
|
||||
%this.addLevelAsset( %levelAsset );
|
||||
}
|
||||
|
||||
// Also add the new level mission as defined in the world editor settings
|
||||
// if we are choosing a level to launch in the editor.
|
||||
if ( %this.launchInEditor )
|
||||
{
|
||||
%this.addMissionFile( "tools/levels/DefaultEditorLevel.mis" );
|
||||
}
|
||||
|
||||
for(%i=0; %i < LevelListEntries.count(); %i++)
|
||||
{
|
||||
%levelAsset = LevelListEntries.getKey(%i);
|
||||
|
||||
LevelList.addRow(%levelAsset.LevelName, "", -1, -30);
|
||||
}
|
||||
|
||||
LevelList.setSelected(0);
|
||||
LevelList.onChange();
|
||||
|
||||
if(!$pref::HostMultiPlayer)
|
||||
LevelSelectTitle.setText("SINGLE PLAYER");
|
||||
else
|
||||
LevelSelectTitle.setText("CREATE SERVER");
|
||||
|
||||
ChooseLevelButtonHolder.setActive();
|
||||
}
|
||||
|
||||
function ChooseLevelButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->goButton.set("btn_a", "Return", "Start Level", "ChooseLevelDlg.beginLevel();");
|
||||
%this-->backButton.set("btn_b", "Escape", "Back", "ChooseLevelDlg.backOut();");
|
||||
}
|
||||
|
||||
function ChooseLevelDlg::onSleep( %this )
|
||||
{
|
||||
// This is set from the outside, only stays true for a single wake/sleep
|
||||
// cycle.
|
||||
%this.launchInEditor = false;
|
||||
}
|
||||
|
||||
function ChooseLevelDlg::addMissionFile( %this, %file )
|
||||
{
|
||||
%levelName = fileBase(%file);
|
||||
%levelDesc = "A Torque level";
|
||||
|
||||
%LevelInfoObject = getLevelInfo(%file);
|
||||
|
||||
if (%LevelInfoObject != 0)
|
||||
{
|
||||
if(%LevelInfoObject.levelName !$= "")
|
||||
%levelName = %LevelInfoObject.levelName;
|
||||
else if(%LevelInfoObject.name !$= "")
|
||||
%levelName = %LevelInfoObject.name;
|
||||
|
||||
if (%LevelInfoObject.desc0 !$= "")
|
||||
%levelDesc = %LevelInfoObject.desc0;
|
||||
|
||||
if (%LevelInfoObject.preview !$= "")
|
||||
%levelPreview = %LevelInfoObject.preview;
|
||||
|
||||
%LevelInfoObject.delete();
|
||||
}
|
||||
|
||||
LevelListEntries.add( %levelName TAB %file TAB %levelDesc TAB %levelPreview );
|
||||
}
|
||||
|
||||
function ChooseLevelDlg::addLevelAsset( %this, %levelAsset )
|
||||
{
|
||||
LevelListEntries.add( %levelAsset );
|
||||
}
|
||||
|
||||
function LevelList::onChange(%this)
|
||||
{
|
||||
%index = %this.getSelectedRow();
|
||||
|
||||
%levelAsset = LevelListEntries.getKey(%index);
|
||||
|
||||
// Get the name
|
||||
ChooseLevelWindow->LevelName.text = %levelAsset.LevelName;
|
||||
|
||||
// Get the level id
|
||||
$selectedLevelAsset = %levelAsset.getAssetId();
|
||||
|
||||
// Find the preview image
|
||||
%levelPreview = %levelAsset.getPreviewImagePath();
|
||||
|
||||
// Test against all of the different image formats
|
||||
// This should probably be moved into an engine function
|
||||
if (isFile(%levelPreview))
|
||||
ChooseLevelWindow->CurrentPreview.setBitmap(%levelPreview);
|
||||
else
|
||||
ChooseLevelWindow->CurrentPreview.setBitmap("data/ui/images/no-preview");
|
||||
|
||||
// Get the description
|
||||
%levelDesc = %levelAsset.description;
|
||||
|
||||
if(%levelDesc !$= "")
|
||||
{
|
||||
ChooseLevelWindow->LevelDescriptionLabel.setVisible(true);
|
||||
ChooseLevelWindow->LevelDescription.setVisible(true);
|
||||
ChooseLevelWindow->LevelDescription.setText(%levelDesc);
|
||||
}
|
||||
else
|
||||
{
|
||||
ChooseLevelWindow->LevelDescriptionLabel.setVisible(false);
|
||||
ChooseLevelWindow->LevelDescription.setVisible(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Do this onMouseUp not via Command which occurs onMouseDown so we do
|
||||
// not have a lingering mouseUp event lingering in the ether.
|
||||
function ChooseLevelDlg::beginLevel(%this)
|
||||
{
|
||||
// So we can't fire the button when loading is in progress.
|
||||
if ( isObject( ServerGroup ) )
|
||||
return;
|
||||
|
||||
// Launch the chosen level with the editor open?
|
||||
if ( ChooseLevelDlg.launchInEditor )
|
||||
{
|
||||
activatePackage( "BootEditor" );
|
||||
ChooseLevelDlg.launchInEditor = false;
|
||||
StartGame("", "SinglePlayer");
|
||||
}
|
||||
else
|
||||
{
|
||||
StartGame();
|
||||
}
|
||||
}
|
||||
|
||||
function ChooseLevelDlg::backOut(%this)
|
||||
{
|
||||
Canvas.popDialog(ChooseLevelDlg);
|
||||
if(isObject(ChooseLevelDlg.returnGui) && ChooseLevelDlg.returnGui.isMethod("onReturnTo"))
|
||||
ChooseLevelDlg.returnGui.onReturnTo();
|
||||
}
|
||||
102
Templates/BaseGame/game/data/UI/guis/controlsMenuSetting.taml
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
<GuiContainer
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="0 0"
|
||||
extent="700 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
class="GraphicsMenuSetting"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false">
|
||||
<GuiBitmapCtrl
|
||||
bitmap="data/ui/images/hudfill.png"
|
||||
wrap="false"
|
||||
position="0 0"
|
||||
extent="550 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiTextCtrl
|
||||
text="Move Forward"
|
||||
maxLength="1024"
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="0 0"
|
||||
extent="550 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
internalName="nameText"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiContainer
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="550 0"
|
||||
extent="150 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false">
|
||||
<GuiButtonCtrl
|
||||
text="W"
|
||||
groupNum="-1"
|
||||
buttonType="PushButton"
|
||||
useMouseEvents="true"
|
||||
position="0 0"
|
||||
extent="150 35"
|
||||
minExtent="8 8"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false"
|
||||
internalName="rebindButton"
|
||||
className="ControlsMenuRebindButton"/>
|
||||
</GuiContainer>
|
||||
</GuiContainer>
|
||||
192
Templates/BaseGame/game/data/UI/guis/guiMusicPlayer.gui
Normal file
|
|
@ -0,0 +1,192 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(GuiMusicPlayer) {
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "1024 768";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "1";
|
||||
superClass = "GuiMusicPlayerClass";
|
||||
|
||||
new GuiWindowCtrl() {
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "1";
|
||||
canMaximize = "1";
|
||||
minSize = "50 50";
|
||||
EdgeSnap = "1";
|
||||
text = "Torque Music Player";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiWindowProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "29 35";
|
||||
Extent = "518 377";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
closeCommand = "toggleMusicPlayer();";
|
||||
|
||||
new GuiCheckBoxCtrl(GuiMusicPlayerFadeCheckBox) {
|
||||
useInactiveState = "0";
|
||||
text = "Fade";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "457 347";
|
||||
Extent = "53 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(GuiMusicPlayerLoopCheckBox) {
|
||||
useInactiveState = "0";
|
||||
text = "Loop";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiCheckBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "457 330";
|
||||
Extent = "44 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "alwaysOn";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
Margin = "0 0 0 0";
|
||||
Padding = "0 0 0 0";
|
||||
AnchorTop = "1";
|
||||
AnchorBottom = "0";
|
||||
AnchorLeft = "1";
|
||||
AnchorRight = "0";
|
||||
isContainer = "1";
|
||||
Profile = "GuiScrollProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "9 31";
|
||||
Extent = "500 298";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiListBoxCtrl(GuiMusicPlayerMusicList) {
|
||||
AllowMultipleSelections = "1";
|
||||
fitParentWidth = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiListBoxProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "1 1";
|
||||
Extent = "485 2";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
superClass = "GuiMusicPlayerMusicListClass";
|
||||
};
|
||||
};
|
||||
new GuiSliderCtrl(GuiMusicPlayerScrubber) {
|
||||
range = "0 1";
|
||||
ticks = "10";
|
||||
value = "0";
|
||||
snap = "false";
|
||||
isContainer = "0";
|
||||
Profile = "GuiSliderProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "114 343";
|
||||
Extent = "331 23";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "$thisControl.onDragComplete();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
class = "GuiMusicPlayerScrubberClass";
|
||||
className = "GuiMusicPlayerScrubberClass";
|
||||
};
|
||||
new GuiButtonCtrl(GuiMusicPlayerStopButton) {
|
||||
text = "Stop";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "57 338";
|
||||
Extent = "40 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "GuiMusicPlayer.stop();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(GuiMusicPlayerPlayButton) {
|
||||
text = "Play";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
isContainer = "0";
|
||||
Profile = "GuiButtonProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "13 338";
|
||||
Extent = "40 30";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
Command = "GuiMusicPlayer.play();";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
237
Templates/BaseGame/game/data/UI/guis/guiMusicPlayer.tscript
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
// A very simple music player.
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Preferences.
|
||||
|
||||
$pref::GuiMusicPlayer::filePattern = "*.ogg\t*.wav";
|
||||
$pref::GuiMusicPlayer::filePatternFMOD = "*.aiff\t*.asf\t*.flac\t*.it\t*.mid\t*.mod\t*.mp2\t*.mp3\t*.ogg\t*.s3m\t*.vag\t*.wav\t*.wma\t*.xm";
|
||||
$pref::GuiMusicPlayer::fadeTime = "3.0";
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Datablocks.
|
||||
|
||||
singleton SFXDescription( GuiMusicPlayerStream : AudioMusic2D )
|
||||
{
|
||||
volume = 1.0;
|
||||
isLooping = false;
|
||||
isStreaming = true;
|
||||
is3D = false;
|
||||
};
|
||||
singleton SFXDescription( GuiMusicPlayerLoopingStream : AudioMusic2D )
|
||||
{
|
||||
volume = 1.0;
|
||||
isLooping = true;
|
||||
isStreaming = true;
|
||||
is3D = false;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Functions.
|
||||
|
||||
function toggleMusicPlayer()
|
||||
{
|
||||
if( !GuiMusicPlayer.isAwake() )
|
||||
{
|
||||
GuiMusicPlayer.setExtent( Canvas.getExtent() );
|
||||
GuiMusicPlayer.setPosition( 0, 0 );
|
||||
|
||||
Canvas.pushDialog( GuiMusicPlayer );
|
||||
}
|
||||
else
|
||||
Canvas.popDialog( GuiMusicPlayer );
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------------------------
|
||||
// Methods.
|
||||
|
||||
function GuiMusicPlayer_onSFXSourceStatusChange( %id, %status )
|
||||
{
|
||||
if( %status $= "Stopped" )
|
||||
GuiMusicPlayer.onStop();
|
||||
}
|
||||
|
||||
function GuiMusicPlayerClass::play( %this )
|
||||
{
|
||||
if( %this.status $= "Stopped"
|
||||
|| %this.status $= "Paused"
|
||||
|| %this.status $= "" )
|
||||
{
|
||||
%isPlaying = true;
|
||||
if( %this.status $= "Paused" && isObject( %this.sfxSource ) )
|
||||
%this.sfxSource.play();
|
||||
else
|
||||
{
|
||||
%sel = GuiMusicPlayerMusicList.getSelectedItem();
|
||||
if( %sel == -1 )
|
||||
%isPlaying = false;
|
||||
else
|
||||
{
|
||||
%desc = GuiMusicPlayerStream;
|
||||
if( GuiMusicPlayerLoopCheckBox.getValue() )
|
||||
%desc = GuiMusicPlayerLoopingStream;
|
||||
|
||||
if( GuiMusicPlayerFadeCheckBox.getValue() )
|
||||
{
|
||||
%desc.fadeInTime = $pref::GuiMusicPlayer::fadeTime;
|
||||
%desc.fadeOutTime = $pref::GuiMusicPlayer::fadeTime;
|
||||
}
|
||||
else
|
||||
{
|
||||
%desc.fadeInTime = 0;
|
||||
%desc.fadeOutTime = 0;
|
||||
}
|
||||
|
||||
%file = GuiMusicPlayerMusicList.getItemText( %sel );
|
||||
%this.sfxSource = sfxPlayOnce( %desc, %file );
|
||||
if( !%this.sfxSource )
|
||||
%isPlaying = false;
|
||||
else
|
||||
{
|
||||
%this.sfxSource.statusCallback = "GuiMusicPlayer_onSFXSourceStatusChange";
|
||||
GuiMusicPlayer.status = "Playing";
|
||||
|
||||
GuiMusicPlayerScrubber.setActive( true );
|
||||
GuiMusicPlayerScrubber.setup( %this.sfxSource.getDuration() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( %isPlaying )
|
||||
{
|
||||
GuiMusicPlayerPlayButton.setText( "Pause" );
|
||||
GuiMusicPlayerPlayButton.command = "GuiMusicPlayer.pause();";
|
||||
GuiMusicPlayerLoopCheckBox.setActive( false );
|
||||
GuiMusicPlayerFadeCheckBox.setActive( false );
|
||||
%this.status = "Playing";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function GuiMusicPlayerClass::stop( %this )
|
||||
{
|
||||
if( %this.status $= "Playing"
|
||||
|| %this.status $= "Paused" )
|
||||
{
|
||||
if( isObject( %this.sfxSource ) )
|
||||
%this.sfxSource.stop( 0 ); // Stop immediately.
|
||||
}
|
||||
}
|
||||
|
||||
function GuiMusicPlayerClass::onStop( %this )
|
||||
{
|
||||
%this.sfxSource = 0;
|
||||
|
||||
GuiMusicPlayerLoopCheckBox.setActive( true );
|
||||
GuiMusicPlayerFadeCheckBox.setActive( true );
|
||||
GuiMusicPlayerScrubber.setActive( false );
|
||||
GuiMusicPlayerPlayButton.setText( "Play" );
|
||||
GuiMusicPlayerPlayButton.Command = "GuiMusicPlayer.play();";
|
||||
%this.status = "Stopped";
|
||||
|
||||
GuiMusicPlayerScrubber.setValue( 0 );
|
||||
}
|
||||
|
||||
function GuiMusicPlayerClass::pause( %this )
|
||||
{
|
||||
if( %this.status $= "Playing" )
|
||||
{
|
||||
if( isObject( %this.sfxSource ) )
|
||||
%this.sfxSource.pause( 0 );
|
||||
|
||||
GuiMusicPlayerPlayButton.setText( "Play" );
|
||||
GuiMusicPlayerPlayButton.command = "GuiMusicPlayer.play();";
|
||||
%this.status = "Paused";
|
||||
}
|
||||
}
|
||||
|
||||
function GuiMusicPlayerClass::seek( %this, %playtime )
|
||||
{
|
||||
if( ( %this.status $= "Playing"
|
||||
|| %this.status $= "Paused" )
|
||||
&& isObject( %this.sfxSource ) )
|
||||
%this.sfxSource.setPosition( %playtime );
|
||||
}
|
||||
|
||||
function GuiMusicPlayer::onWake( %this )
|
||||
{
|
||||
GuiMusicPlayerMusicList.load();
|
||||
}
|
||||
|
||||
function GuiMusicPlayerMusicListClass::load( %this )
|
||||
{
|
||||
// Remove all the files currently in the list.
|
||||
|
||||
%this.clearItems();
|
||||
|
||||
// Find the file matching pattern we should use.
|
||||
|
||||
%filePattern = $pref::GuiMusicPlayer::filePattern;
|
||||
%sfxProvider = getWord( sfxGetDeviceInfo(), 0 );
|
||||
%filePatternVarName = "$pref::GuiMusicPlayer::filePattern" @ %sfxProvider;
|
||||
if( isDefined( %filePatternVarName ) )
|
||||
eval( "%filePattern = " @ %filePatternVarName @ ";" );
|
||||
|
||||
// Find all files matching the pattern.
|
||||
|
||||
for( %file = findFirstFileMultiExpr( %filePattern );
|
||||
%file !$= "";
|
||||
%file = findNextFileMultiExpr( %filePattern ) )
|
||||
%this.addItem( makeRelativePath( %file, getMainDotCsDir() ) );
|
||||
}
|
||||
|
||||
function GuiMusicPlayerMusicList::onDoubleClick( %this )
|
||||
{
|
||||
GuiMusicPlayer.stop();
|
||||
GuiMusicPlayer.play();
|
||||
}
|
||||
|
||||
function GuiMusicPlayerScrubber::onMouseDragged( %this )
|
||||
{
|
||||
%this.isBeingDragged = true;
|
||||
}
|
||||
|
||||
function GuiMusicPlayerScrubberClass::setup( %this, %totalPlaytime )
|
||||
{
|
||||
%this.range = "0 " @ %totalPlaytime;
|
||||
%this.ticks = %totalPlaytime / 5; // One tick per five seconds.
|
||||
|
||||
%this.update();
|
||||
}
|
||||
|
||||
function GuiMusicPlayerScrubberClass::update( %this )
|
||||
{
|
||||
if( GuiMusicPlayer.status $= "Playing"
|
||||
&& !%this.isBeingDragged )
|
||||
%this.setValue( GuiMusicPlayer.sfxSource.getPosition() );
|
||||
|
||||
if( GuiMusicPlayer.status $= "Playing"
|
||||
|| GuiMusicPlayer.status $= "Paused" )
|
||||
%this.schedule( 5, "update" );
|
||||
}
|
||||
|
||||
function GuiMusicPlayerScrubberClass::onDragComplete( %this )
|
||||
{
|
||||
GuiMusicPlayer.seek( %this.getValue() );
|
||||
%this.isBeingDragged = false;
|
||||
}
|
||||
722
Templates/BaseGame/game/data/UI/guis/joinServerMenu.gui
Normal file
|
|
@ -0,0 +1,722 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(JoinServerMenu) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
returnGui = "MainMenuGui";
|
||||
|
||||
new GuiInputCtrl(JoinServerMenuInputHandler){
|
||||
profile = "GuiInputCtrlProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
sendBreakEvents="1";
|
||||
};
|
||||
|
||||
new GuiControl(JoinServerWindow) {
|
||||
position = "48 56";
|
||||
extent = "928 655";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 0";
|
||||
extent = "927 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "JOIN SERVER";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "22 10";
|
||||
extent = "207 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel_low.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 40";
|
||||
extent = "927 618";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Player Name:";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "12 47";
|
||||
extent = "109 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuSubHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl() {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "Visitor";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "124 47";
|
||||
extent = "144 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuTextEditProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
variable = "$pref::Player::Name";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(JS_status) {
|
||||
text = "No servers found.";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "277 47";
|
||||
extent = "148 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuSubHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Players";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "269 67";
|
||||
extent = "36 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Version";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "335 67";
|
||||
extent = "38 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Game";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "412 67";
|
||||
extent = "28 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Ping";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "212 67";
|
||||
extent = "20 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Server Name";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "12 67";
|
||||
extent = "63 18";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "dynamic";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "0";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "19 98";
|
||||
extent = "890 501";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextListCtrl(JS_serverList) {
|
||||
columns = "0 200 270 335 400";
|
||||
fitParentWidth = "1";
|
||||
clipColumnText = "0";
|
||||
rowHeightPadding = "2";
|
||||
position = "1 1";
|
||||
extent = "888 8";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextArrayProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
altCommand = "JoinServerDlg.join();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl(JS_queryStatus) {
|
||||
position = "16 615";
|
||||
extent = "900 35";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "0";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiProgressCtrl(JS_statusBar) {
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "84 0";
|
||||
extent = "695 35";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiProgressProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(JS_cancelQuery) {
|
||||
text = "Cancel!";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "84 35";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "JoinServerDlg.cancel();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(JS_statusText) {
|
||||
text = "Querying master server";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "84 0";
|
||||
extent = "695 35";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiButtonCtrl(JoinServerBackBtn) {
|
||||
text = "Return to Menu";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "0 583";
|
||||
extent = "160 33";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "1";
|
||||
command = "Canvas.popDialog(JoinServerMenu);\n\nif(isObject(JoinServerMenu.returnGui) && JoinServerMenu.returnGui.isMethod(\"onReturnTo\")) JoinServerMenu.returnGui.onReturnTo();";
|
||||
accelerator = "escape";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(JoinServerQryLanBtn) {
|
||||
text = "Query Lan";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "160 583";
|
||||
extent = "160 33";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "1";
|
||||
command = "JoinServerMenu.queryLan();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(JoinServerQryInternetBtn) {
|
||||
text = "Query Internet";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "320 583";
|
||||
extent = "160 33";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "1";
|
||||
command = "JoinServerMenu.query();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(JoinServerRefreshBtn) {
|
||||
text = "Refresh Server";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "480 583";
|
||||
extent = "160 33";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "1";
|
||||
command = "JoinServerMenu.refresh();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(JoinServerJoinBtn) {
|
||||
text = "Join Server";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "1";
|
||||
position = "640 583";
|
||||
extent = "160 33";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "0";
|
||||
command = "JoinServerMenu.join();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "189 652";
|
||||
extent = "646 130";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl(JoinServerButtonHolder) {
|
||||
position = "109 711";
|
||||
extent = "791 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Join";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.apply();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "joinButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Back";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "651 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.backOut();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "backButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Prev Tab";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "0";
|
||||
command = "OptionsMenu.prevTab();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "queryLANButton";
|
||||
class = "MenuInputButton";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Next Tab";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "144 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "0";
|
||||
active = "0";
|
||||
command = "OptionsMenu.nextTab();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "queryInternetButton";
|
||||
class = "MenuInputButton";
|
||||
hidden = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
bitmapAsset = "UI:Keyboard_Black_R_image";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Reset";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "325 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.resetToDefaults();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "refreshButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
164
Templates/BaseGame/game/data/UI/guis/joinServerMenu.tscript
Normal file
|
|
@ -0,0 +1,164 @@
|
|||
|
||||
function JoinServerMenu::onWake()
|
||||
{
|
||||
// Double check the status. Tried setting this the control
|
||||
// inactive to start with, but that didn't seem to work.
|
||||
JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
|
||||
|
||||
JoinServerButtonHolder.setActive();
|
||||
|
||||
JoinServerMenuInputHandler.setFirstResponder();
|
||||
}
|
||||
|
||||
function JoinServerButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->joinButton.set("btn_start", "Return", "Join", "JoinServerMenu.join();");
|
||||
%this-->backButton.set("btn_b", "Escape", "Back", "JoinServerMenu.backOut();");
|
||||
%this-->refreshButton.set("btn_y", "R", "Refresh", "JoinServerMenu.refresh();");
|
||||
%this-->queryLANButton.set("btn_a", "Q", "Query LAN", "JoinServerMenu.queryLan();");
|
||||
%this-->queryInternetButton.set("btn_x", "E", "Query Internet", "JoinServerMenu.query();");
|
||||
}
|
||||
|
||||
function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
|
||||
{
|
||||
if(%state)
|
||||
$activeMenuButtonContainer.processInputs(%device, %action);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::query(%this)
|
||||
{
|
||||
queryMasterServer(
|
||||
0, // Query flags
|
||||
$Client::GameTypeQuery, // gameTypes
|
||||
$Client::MissionTypeQuery, // missionType
|
||||
0, // minPlayers
|
||||
100, // maxPlayers
|
||||
0, // maxBots
|
||||
2, // regionMask
|
||||
0, // maxPing
|
||||
100, // minCPU
|
||||
0 // filterFlags
|
||||
);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::queryLan(%this)
|
||||
{
|
||||
queryLANServers(
|
||||
$pref::Net::Port, // lanPort for local queries
|
||||
0, // Query flags
|
||||
$Client::GameTypeQuery, // gameTypes
|
||||
$Client::MissionTypeQuery, // missionType
|
||||
0, // minPlayers
|
||||
100, // maxPlayers
|
||||
0, // maxBots
|
||||
2, // regionMask
|
||||
0, // maxPing
|
||||
100, // minCPU
|
||||
0 // filterFlags
|
||||
);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::cancel(%this)
|
||||
{
|
||||
cancelServerQuery();
|
||||
JS_queryStatus.setVisible(false);
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::join(%this)
|
||||
{
|
||||
cancelServerQuery();
|
||||
%index = JS_serverList.getSelectedId();
|
||||
|
||||
JoinGame(%index);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::refresh(%this)
|
||||
{
|
||||
cancelServerQuery();
|
||||
%index= JS_serverList.getSelectedId();
|
||||
|
||||
// The server info index is stored in the row along with the
|
||||
// rest of displayed info.
|
||||
if( setServerInfo( %index ) )
|
||||
querySingleServer( $ServerInfo::Address, 0 );
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::refreshSelectedServer( %this )
|
||||
{
|
||||
querySingleServer( $JoinGameAddress, 0 );
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::backOut(%this)
|
||||
{
|
||||
cancelServerQuery();
|
||||
|
||||
Canvas.popDialog(JoinServerMenu);
|
||||
if(isObject(JoinServerMenu.returnGui) && JoinServerMenu.returnGui.isMethod("onReturnTo"))
|
||||
JoinServerMenu.returnGui.onReturnTo();
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function JoinServerMenu::update(%this)
|
||||
{
|
||||
// Copy the servers into the server list.
|
||||
JS_queryStatus.setVisible(false);
|
||||
JS_serverList.clear();
|
||||
%sc = getServerCount();
|
||||
for( %i = 0; %i < %sc; %i ++ ) {
|
||||
setServerInfo(%i);
|
||||
JS_serverList.addRow( %i,
|
||||
$ServerInfo::Name TAB
|
||||
$ServerInfo::Ping TAB
|
||||
$ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
|
||||
$ServerInfo::Version TAB
|
||||
$ServerInfo::MissionName
|
||||
);
|
||||
}
|
||||
JS_serverList.sort(0);
|
||||
JS_serverList.setSelectedRow(0);
|
||||
JS_serverList.scrollVisible(0);
|
||||
|
||||
JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
function onServerQueryStatus(%status, %msg, %value)
|
||||
{
|
||||
echo("ServerQuery: " SPC %status SPC %msg SPC %value);
|
||||
// Update query status
|
||||
// States: start, update, ping, query, done
|
||||
// value = % (0-1) done for ping and query states
|
||||
if (!JS_queryStatus.isVisible())
|
||||
JS_queryStatus.setVisible(true);
|
||||
|
||||
switch$ (%status) {
|
||||
case "start":
|
||||
JoinServerJoinBtn.setActive(false);
|
||||
JoinServerQryInternetBtn.setActive(false);
|
||||
JS_statusText.setText(%msg);
|
||||
JS_statusBar.setValue(0);
|
||||
JS_serverList.clear();
|
||||
|
||||
case "ping":
|
||||
JS_statusText.setText("Ping Servers");
|
||||
JS_statusBar.setValue(%value);
|
||||
|
||||
case "query":
|
||||
JS_statusText.setText("Query Servers");
|
||||
JS_statusBar.setValue(%value);
|
||||
|
||||
case "done":
|
||||
JoinServerQryInternetBtn.setActive(true);
|
||||
JS_queryStatus.setVisible(false);
|
||||
JS_status.setText(%msg);
|
||||
JoinServerMenu.update();
|
||||
}
|
||||
}
|
||||
121
Templates/BaseGame/game/data/UI/guis/loadingGui.gui
Normal file
|
|
@ -0,0 +1,121 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
|
||||
bitmapAsset = "UI:background_dark_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
|
||||
new GuiControl() {
|
||||
position = "263 301";
|
||||
extent = "497 166";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "disconnect();\nCanvas.setContent(ProjectSettings.value(\"UI/mainMenuName\"));";
|
||||
accelerator = "escape";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
bitmapAsset = "UI:panel_image";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
extent = "497 166";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapCtrl(LoadingLogo) {
|
||||
bitmapAsset = "UI:Torque_3D_logo_alt_image";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "27 6";
|
||||
extent = "443 139";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiProgressBitmapCtrl(LoadingProgress) {
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "17 126";
|
||||
extent = "464 24";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiProgressBitmapProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(LoadingProgressTxt) {
|
||||
text = "LOADING DATABLOCKS";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "28 144";
|
||||
extent = "440 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "center";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
115
Templates/BaseGame/game/data/UI/guis/mainMenu.gui
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
exec( "tools/gui/profiles.ed.tscript" );
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
|
||||
bitmapAsset = "UI:background_dark_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
Enabled = "1";
|
||||
isDecoy = "0";
|
||||
navigationIndex = "-1";
|
||||
|
||||
new GuiBitmapCtrl(MainMenuAppLogo) {
|
||||
bitmapAsset = "UI:Torque_3D_logo_alt_image";
|
||||
bitmapMode = "Stretched";
|
||||
autoFitExtents = "0";
|
||||
useModifiers = "0";
|
||||
useStates = "1";
|
||||
masked = "0";
|
||||
groupNum = "-1";
|
||||
position = "550 30";
|
||||
extent = "443 139";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
navigationIndex = "-1";
|
||||
};
|
||||
|
||||
new GuiGameListMenuCtrl(MainMenuButtonList) {
|
||||
debugRender = "0";
|
||||
callbackOnInputs = "1";
|
||||
position = "292 103";
|
||||
extent = "439 561";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "DefaultListMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
class = "UIMenuButtonList";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl(MainMenuButtonHolder) {
|
||||
position = "189 711";
|
||||
extent = "646 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "goButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
79
Templates/BaseGame/game/data/UI/guis/mainMenu.tscript
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
function MainMenuGui::onAdd(%this)
|
||||
{
|
||||
$activeControllerName = "K&M"; //default input type
|
||||
}
|
||||
|
||||
function MainMenuGui::onWake(%this)
|
||||
{
|
||||
MainMenuButtonList.hidden = false;
|
||||
MainMenuButtonHolder.setActive();
|
||||
}
|
||||
|
||||
function MainMenuGui::onSleep(%this)
|
||||
{
|
||||
MainMenuButtonHolder.hidden = true;
|
||||
}
|
||||
|
||||
function MainMenuButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->goButton.set("btn_a", "Return", "Go", "MainMenuButtonList.activateRow();");
|
||||
}
|
||||
|
||||
function MainMenuButtonList::onAdd(%this)
|
||||
{
|
||||
MainMenuButtonList.addRow("Single Player", "openSinglePlayerMenu", 0);
|
||||
MainMenuButtonList.addRow("Create Server", "openMultiPlayerMenu", 4, -15);
|
||||
MainMenuButtonList.addRow("Join Server", "openJoinServerMenu", 4, -15);
|
||||
MainMenuButtonList.addRow("Options", "openOptionsMenu", 6, -15);
|
||||
MainMenuButtonList.addRow("Open World Editor", "openWorldEditorBtn", 6, -15);
|
||||
MainMenuButtonList.addRow("Open GUI Editor", "openGUIEditorBtn", 6, -15);
|
||||
MainMenuButtonList.addRow("Exit Game", "quit", 8, -15);
|
||||
}
|
||||
|
||||
function openSinglePlayerMenu()
|
||||
{
|
||||
$pref::HostMultiPlayer=false;
|
||||
Canvas.pushDialog(ChooseLevelDlg);
|
||||
ChooseLevelDlg.returnGui = MainMenuGui;
|
||||
MainMenuButtonList.hidden = true;
|
||||
MainMenuButtonHolder.hidden = true;
|
||||
}
|
||||
|
||||
function openMultiPlayerMenu()
|
||||
{
|
||||
$pref::HostMultiPlayer=true;
|
||||
Canvas.pushDialog(ChooseLevelDlg);
|
||||
ChooseLevelDlg.returnGui = MainMenuGui;
|
||||
MainMenuButtonList.hidden = true;
|
||||
}
|
||||
|
||||
function openJoinServerMenu()
|
||||
{
|
||||
Canvas.pushDialog(JoinServerMenu);
|
||||
JoinServerMenu.returnGui = MainMenuGui;
|
||||
MainMenuButtonList.hidden = true;
|
||||
}
|
||||
|
||||
function openOptionsMenu()
|
||||
{
|
||||
Canvas.pushDialog(OptionsMenu);
|
||||
OptionsMenu.returnGui = MainMenuGui;
|
||||
MainMenuButtonList.hidden = true;
|
||||
}
|
||||
|
||||
function openWorldEditorBtn()
|
||||
{
|
||||
fastLoadWorldEdit(1);
|
||||
}
|
||||
|
||||
function openGUIEditorBtn()
|
||||
{
|
||||
fastLoadGUIEdit(1);
|
||||
}
|
||||
|
||||
function MainMenuGui::onReturnTo(%this)
|
||||
{
|
||||
MainMenuButtonList.hidden = false;
|
||||
MainMenuButtonList.setFirstResponder();
|
||||
MainMenuButtonHolder.setActive();
|
||||
}
|
||||
348
Templates/BaseGame/game/data/UI/guis/messageBoxDlg.gui
Normal file
|
|
@ -0,0 +1,348 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(MessageBoxDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiOverlayProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiControl(MessageBoxCtrl) {
|
||||
position = "192 197";
|
||||
extent = "641 381";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 0";
|
||||
extent = "641 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(MessageBoxTitleText) {
|
||||
text = "OPTIONS";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "32 7";
|
||||
extent = "577 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel_low.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 40";
|
||||
extent = "641 341";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl(MessageBoxText) {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
useURLMouseCursor = "0";
|
||||
position = "81 83";
|
||||
extent = "481 19";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "MenuMLSubHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl(MessageBoxOKButtonHolder) {
|
||||
position = "0 285";
|
||||
extent = "642 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "251 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "OKButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl(MessageBoxOCButtonHolder) {
|
||||
position = "0 285";
|
||||
extent = "642 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "171 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "OKButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "323 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "CancelButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl(MessageBoxYNCButtonHolder) {
|
||||
position = "0 285";
|
||||
extent = "642 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "99 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "yesButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "251 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "noButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Go";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "403 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuButtonList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "CancelButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
557
Templates/BaseGame/game/data/UI/guis/netGraphGui.gui
Normal file
|
|
@ -0,0 +1,557 @@
|
|||
function execNetGraphGuiGUI()
|
||||
{
|
||||
if ( isObject( NetGraphGui ) )
|
||||
NetGraphGui.delete();
|
||||
|
||||
if ( isObject( NetGraphProfile ) )
|
||||
NetGraphProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphGhostsActiveProfile ) )
|
||||
NetGraphGhostsActiveProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphGhostUpdatesProfile ) )
|
||||
NetGraphGhostUpdatesProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphBitsSentProfile ) )
|
||||
NetGraphBitsSentProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphBitsReceivedProfile ) )
|
||||
NetGraphBitsReceivedProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphLatencyProfile ) )
|
||||
NetGraphLatencyProfile.delete();
|
||||
|
||||
if ( isObject( NetGraphPacketLossProfile ) )
|
||||
NetGraphPacketLossProfile.delete();
|
||||
|
||||
exec( "./NetGraphGui.gui" );
|
||||
}
|
||||
|
||||
// Profiles
|
||||
new GuiControlProfile (NetGraphProfile)
|
||||
{
|
||||
modal = false;
|
||||
opaque = false;
|
||||
canKeyFocus = false;
|
||||
};
|
||||
|
||||
new GuiControlProfile (NetGraphKeyContainerProfile)
|
||||
{
|
||||
border = true;
|
||||
opaque = true;
|
||||
fillColor = "100 100 100 200";
|
||||
};
|
||||
new GuiControlProfile (NetGraphGhostsActiveProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "255 255 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphGhostUpdatesProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "255 0 0";
|
||||
};
|
||||
new GuiControlProfile (NetGraphBitsSentProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "0 255 0";
|
||||
};
|
||||
new GuiControlProfile (NetGraphBitsReceivedProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "0 0 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphLatencyProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "0 255 255";
|
||||
};
|
||||
new GuiControlProfile (NetGraphPacketLossProfile)
|
||||
{
|
||||
border = false;
|
||||
fontColor = "0 0 0";
|
||||
};
|
||||
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(NetGraphGui) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
noCursor = "1";
|
||||
|
||||
new GuiGraphCtrl(NetGraph) {
|
||||
centerY = "1";
|
||||
plotColor[0] = "1 1 1 1";
|
||||
plotColor[1] = "1 0 0 1";
|
||||
plotColor[2] = "0 1 0 1";
|
||||
plotColor[3] = "0 0 1 1";
|
||||
plotColor[4] = "0 1 1 1";
|
||||
plotColor[5] = "0 0 0 1";
|
||||
plotType[0] = "PolyLine";
|
||||
plotType[1] = "PolyLine";
|
||||
plotType[2] = "PolyLine";
|
||||
plotType[3] = "PolyLine";
|
||||
plotType[4] = "PolyLine";
|
||||
plotType[5] = "PolyLine";
|
||||
plotInterval[0] = "0";
|
||||
plotInterval[1] = "0";
|
||||
plotInterval[2] = "0";
|
||||
plotInterval[3] = "0";
|
||||
plotInterval[4] = "0";
|
||||
plotInterval[5] = "0";
|
||||
position = "816 5";
|
||||
extent = "200 200";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphKeyContainerProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "816 205";
|
||||
extent = "200 104";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphKeyContainerProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiTextCtrl(GhostsActive) {
|
||||
text = "Ghosts Active";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 0";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphGhostsActiveProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(GhostUpdates) {
|
||||
text = "Ghost Updates";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "100 0";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphGhostUpdatesProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(BitsSent) {
|
||||
text = "Bytes Sent";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 18";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphBitsSentProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(BitsReceived) {
|
||||
text = "Bytes Received";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "100 18";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphBitsReceivedProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(Latency) {
|
||||
text = "Latency";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 36";
|
||||
extent = "100 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphLatencyProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(PacketLoss) {
|
||||
text = "Packet Loss";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "100 36";
|
||||
extent = "59 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Network Simulation:";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 52";
|
||||
extent = "97 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Simulated Latency:";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 68";
|
||||
extent = "91 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "ms";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "179 68";
|
||||
extent = "20 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl(NetGraphSimLatency) {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "0";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "112 67";
|
||||
extent = "64 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Simulated Packet Loss:";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 83";
|
||||
extent = "111 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "%";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "179 84";
|
||||
extent = "20 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
vertSizing = "bottom";
|
||||
profile = "NetGraphPacketLossProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl(NetGraphSimPacket) {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "0";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "112 85";
|
||||
extent = "64 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "if(NetGraphSimLatency.text $= \"\" || NetGraphSimLatency.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\n\nif(NetGraphSimPacket.text $= \"\" || NetGraphSimPacket.text < 0)\n{\n NetGraphSimLatency.text = 0;\n}\nelse if(NetGraphSimPacket.text > 100)\n{\n NetGraphSimPacket.text = 100;\n}\n\nnetSimulateLag( NetGraphSimLatency.text, NetGraphSimPacket.text );";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
||||
// Functions
|
||||
function toggleNetGraph()
|
||||
{
|
||||
if(!$NetGraph::isInitialized)
|
||||
{
|
||||
NetGraph::updateStats();
|
||||
$NetGraph::isInitialized = true;
|
||||
}
|
||||
|
||||
if(!Canvas.isMember(NetGraphGui))
|
||||
{
|
||||
Canvas.add(NetGraphGui);
|
||||
}
|
||||
else
|
||||
{
|
||||
Canvas.remove(NetGraphGui);
|
||||
netSimulateLag( 0, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
NetGraph.addDatum(2,$Stats::netBitsSent);
|
||||
BitsSent.setText("Bytes Sent: " @ $Stats::netBitsSent);
|
||||
NetGraph.addDatum(3,$Stats::netBitsReceived);
|
||||
BitsReceived.setText("Bytes 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;
|
||||
}
|
||||
}
|
||||
|
||||
function NetGraphSimLatency::onReturn(%this)
|
||||
{
|
||||
NetGraph.updateNetworkSimulation();
|
||||
}
|
||||
|
||||
function NetGraphSimPacket::onReturn(%this)
|
||||
{
|
||||
NetGraph.updateNetworkSimulation();
|
||||
}
|
||||
|
||||
function NetGraph::updateNetworkSimulation(%this)
|
||||
{
|
||||
%latency = NetGraphSimLatency.getText();
|
||||
|
||||
if(%latency $= "" || %latency < 0)
|
||||
{
|
||||
NetGraphSimLatency.text = 0;
|
||||
%latency = 0;
|
||||
}
|
||||
|
||||
%packetLoss = NetGraphSimPacket.getText();
|
||||
|
||||
if(%packetLoss $= "" || %packetLoss < 0)
|
||||
{
|
||||
NetGraphSimLatency.text = 0;
|
||||
%packetLoss = 0;
|
||||
}
|
||||
else if(%packetLoss > 100)
|
||||
{
|
||||
NetGraphSimPacket.text = 100;
|
||||
%packetLoss = 100;
|
||||
}
|
||||
|
||||
netSimulateLag( %latency, %packetLoss );
|
||||
}
|
||||
1432
Templates/BaseGame/game/data/UI/guis/optionsDlg.gui
Normal file
476
Templates/BaseGame/game/data/UI/guis/optionsMenu.gui
Normal file
|
|
@ -0,0 +1,476 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(OptionsMenu) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
pageTabIndex = "0";
|
||||
returnGui = "MainMenuGui";
|
||||
tamlReader = "20088";
|
||||
tile = "0";
|
||||
useVariable = "0";
|
||||
|
||||
new GuiControl() {
|
||||
position = "48 56";
|
||||
extent = "928 655";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 0";
|
||||
extent = "927 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "OPTIONS";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "22 7";
|
||||
extent = "120 28";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapBarCtrl() {
|
||||
percent = "100";
|
||||
vertical = "0";
|
||||
flipClip = "0";
|
||||
bitmap = "data/ui/images/panel_low.png";
|
||||
color = "255 255 255 255";
|
||||
position = "0 40";
|
||||
extent = "927 618";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Display";
|
||||
groupNum = "1";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
position = "114 49";
|
||||
extent = "140 32";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.populateDisplaySettingsList();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "DisplayButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Graphics";
|
||||
groupNum = "1";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
position = "258 49";
|
||||
extent = "140 32";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.populateGraphicsSettingsList();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "GraphicsButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Audio";
|
||||
groupNum = "1";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
position = "402 49";
|
||||
extent = "140 32";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.populateAudioSettingsList();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "AudioButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Keyboard + Mouse";
|
||||
groupNum = "1";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
position = "547 49";
|
||||
extent = "140 32";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.populateKeyboardMouseSettingsList();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "KBMButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl() {
|
||||
text = "Gamepad";
|
||||
groupNum = "1";
|
||||
buttonType = "RadioButton";
|
||||
useMouseEvents = "0";
|
||||
position = "691 49";
|
||||
extent = "140 32";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "OptionsMenu.populateGamepadSettingsList();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "gamepadButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiScrollCtrl() {
|
||||
willFirstRespond = "1";
|
||||
hScrollBar = "alwaysOff";
|
||||
vScrollBar = "dynamic";
|
||||
lockHorizScroll = "1";
|
||||
lockVertScroll = "0";
|
||||
constantThumbHeight = "0";
|
||||
childMargin = "0 0";
|
||||
mouseWheelScrollSpeed = "-1";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "1 83";
|
||||
extent = "622 573";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiGameListMenuCtrl(OptionsMenuSettingsList) {
|
||||
debugRender = "0";
|
||||
callbackOnInputs = "1";
|
||||
position = "1 1";
|
||||
extent = "621 510";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "DefaultListMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
class = "UIMenuButtonList";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiTextCtrl(OptionName) {
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "635 94";
|
||||
extent = "293 17";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "MenuSubHeaderText";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl(OptionDescription) {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "This is a placeholder text for an option.";
|
||||
useURLMouseCursor = "0";
|
||||
position = "635 126";
|
||||
extent = "293 14";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMLTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "189 652";
|
||||
extent = "646 130";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl(OptionsButtonHolder) {
|
||||
position = "109 711";
|
||||
extent = "791 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Apply";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "ChooseLevelDlg.beginLevel();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "applyButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Back";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "651 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "ChooseLevelDlg.backOut();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "backButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Prev Tab";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "0 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "prevTabButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Next Tab";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "144 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "nextTabButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Reset";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "325 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "resetButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
688
Templates/BaseGame/game/data/UI/guis/optionsMenu.tscript
Normal file
|
|
@ -0,0 +1,688 @@
|
|||
//options settings
|
||||
|
||||
//Screen and Display menu
|
||||
//Renderer Mode
|
||||
//Screen resolution
|
||||
//Windowed/fullscreen(borderless?)
|
||||
//VSync
|
||||
|
||||
//Screen brightness
|
||||
//screen brightness
|
||||
//screen gamma
|
||||
|
||||
//Lighting Menu
|
||||
//Shadow Distance(Distance shadows are drawn to. Also affects shadowmap slices)
|
||||
//Shadow Quality(Resolution of shadows rendered, setting to none disables dynamic shadows)
|
||||
//Soft Shadows(Whether shadow softening is used)
|
||||
//Shadow caching(If the lights enable it, shadow caching is activated)
|
||||
//Light Draw Distance(How far away lights are still drawn. Doesn't impact vector lights like the sun)
|
||||
|
||||
//Mesh and Textures Menu
|
||||
//Draw distance(Overall draw distance) -slider
|
||||
//Object draw distance(Draw distance from small/unimportant objects) -slider
|
||||
//Mesh quality
|
||||
//Texture quality
|
||||
//Foliage draw distance
|
||||
//Terrain Quality
|
||||
//Decal Quality
|
||||
|
||||
//Effects Menu
|
||||
//Parallax
|
||||
//HDR
|
||||
//Light shafts
|
||||
//Motion Blur
|
||||
//Depth of Field
|
||||
//SSAO
|
||||
//AA(ModelXAmount)[defualt is FXAA]
|
||||
//Anisotropic filtering
|
||||
|
||||
//Keybinds
|
||||
|
||||
//Camera
|
||||
//horizontal mouse sensitivity
|
||||
//vert mouse sensitivity
|
||||
//invert vertical
|
||||
//zoom mouse sensitivities(both horz/vert)
|
||||
//headbob
|
||||
//FOV
|
||||
|
||||
function OptionsMenuSettingsList::onAdd(%this)
|
||||
{
|
||||
}
|
||||
|
||||
function OptionsMenu::onWake(%this)
|
||||
{
|
||||
MainMenuButtonList.hidden = true;
|
||||
|
||||
%this.pageTabIndex = 0;
|
||||
%tab = %this.getTab();
|
||||
%tab.performClick();
|
||||
|
||||
OptionsButtonHolder.setActive();
|
||||
}
|
||||
|
||||
function OptionsButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->prevTabButton.set("btn_l", "", "Prev Tab", "OptionsMenu.prevTab();", true);
|
||||
%this-->nextTabButton.set("btn_r", "", "Next Tab", "OptionsMenu.nextTab();", true);
|
||||
%this-->resetButton.set("btn_back", "R", "Reset", "OptionsMenu.resetToDefaults();");
|
||||
%this-->applyButton.set("btn_start", "Return", "Apply", "OptionsMenu.apply();");
|
||||
%this-->backButton.set("btn_b", "Escape", "Back", "OptionsMenu.backOut();");
|
||||
}
|
||||
|
||||
function OptionsMenu::apply(%this)
|
||||
{
|
||||
if(%this.pageTabIndex == 0)
|
||||
{
|
||||
%this.applyDisplaySettings();
|
||||
}
|
||||
else if(%this.pageTabIndex == 1)
|
||||
{
|
||||
%this.applyGraphicsSettings();
|
||||
}
|
||||
else if(%this.pageTabIndex == 2)
|
||||
{
|
||||
%this.applyAudioSettings();
|
||||
}
|
||||
else if(%this.pageTabIndex == 3 || %this.pageTabIndex == 4)
|
||||
{
|
||||
%prefPath = getPrefpath();
|
||||
|
||||
%actionMapCount = ActionMapGroup.getCount();
|
||||
|
||||
%actionMapList = "";
|
||||
%append = false;
|
||||
for(%i=0; %i < %actionMapCount; %i++)
|
||||
{
|
||||
%actionMap = ActionMapGroup.getObject(%i);
|
||||
|
||||
if(%actionMap == GlobalActionMap.getId())
|
||||
continue;
|
||||
|
||||
%actionMap.save( %prefPath @ "/keybinds." @ $TorqueScriptFileExtension, %append );
|
||||
|
||||
if(%append != true)
|
||||
%append = true;
|
||||
}
|
||||
}
|
||||
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function OptionsMenu::resetToDefaults(%this)
|
||||
{
|
||||
MessageBoxOKCancel("", "This will set the graphical settings back to the auto-detected defaults. Do you wish to continue?", "AutodetectGraphics();", "");
|
||||
}
|
||||
|
||||
function OptionsMenuSettingsList::onChange(%this)
|
||||
{
|
||||
%optionName = %this.getRowLabel(%this.getSelectedRow());
|
||||
%tooltipText = %this.getTooltip(%this.getSelectedRow());
|
||||
|
||||
OptionName.setText(%optionName);
|
||||
OptionDescription.setText(%tooltipText);
|
||||
return;
|
||||
|
||||
OptionsMenuSettingsList.clearOptions();
|
||||
|
||||
%currentRowText = %this.getRowLabel(%this.getSelectedRow());
|
||||
|
||||
if(%currentRowText $= "Display")
|
||||
{
|
||||
OptionsMenuList.populateDisplaySettingsList();
|
||||
}
|
||||
else if(%currentRowText $= "Graphics")
|
||||
{
|
||||
OptionsMenuList.populateGraphicsSettingsList();
|
||||
}
|
||||
else if(%currentRowText $= "Audio")
|
||||
{
|
||||
OptionsMenuList.populateAudioSettingsList();
|
||||
}
|
||||
else if(%currentRowText $= "Keyboard + Mouse")
|
||||
{
|
||||
OptionsMenuList.populateKeyboardMouseSettingsList();
|
||||
}
|
||||
else if(%currentRowText $= "Gamepad")
|
||||
{
|
||||
OptionsMenuList.populateGamepadSettingsList();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function OptionsMenu::prevTab(%this)
|
||||
{
|
||||
%this.pageTabIndex--;
|
||||
if(%this.pageTabIndex < 0)
|
||||
%this.pageTabIndex = 4;
|
||||
|
||||
%tabBtn = %this.getTab();
|
||||
%tabBtn.performClick();
|
||||
}
|
||||
|
||||
function OptionsMenu::nextTab(%this)
|
||||
{
|
||||
%this.pageTabIndex++;
|
||||
if(%this.pageTabIndex > 4)
|
||||
%this.pageTabIndex = 0;
|
||||
|
||||
%tabBtn = %this.getTab();
|
||||
%tabBtn.performClick();
|
||||
}
|
||||
|
||||
function OptionsMenu::getTab(%this)
|
||||
{
|
||||
if(%this.pageTabIndex == 0)
|
||||
return %this-->DisplayButton;
|
||||
else if(%this.pageTabIndex == 1)
|
||||
return %this-->GraphicsButton;
|
||||
else if(%this.pageTabIndex == 2)
|
||||
return %this-->AudioButton;
|
||||
else if(%this.pageTabIndex == 3)
|
||||
return %this-->KBMButton;
|
||||
else if(%this.pageTabIndex == 4)
|
||||
return %this-->GamepadButton;
|
||||
else
|
||||
return %this-->DisplayButton;
|
||||
}
|
||||
|
||||
function OptionsMenu::populateDisplaySettingsList(%this)
|
||||
{
|
||||
%this.pageTabIndex = 0;
|
||||
OptionsMenuSettingsList.clearRows();
|
||||
|
||||
OptionName.setText("");
|
||||
OptionDescription.setText("");
|
||||
|
||||
//First, lets double-check the active device is accurate. Sometimes the default value in our prefs doesn't match the active one
|
||||
%displayDevice = getDisplayDeviceType();
|
||||
if($changingDisplayDevice !$= "")
|
||||
%displayDevice = $changingDisplayDevice;
|
||||
|
||||
%apiList = "";
|
||||
%apiCount = GFXInit::getAdapterCount();
|
||||
%apiIdx = 0;
|
||||
for(%i=0; %i < %apiCount; %i++)
|
||||
{
|
||||
%api = GFXInit::getAdapterType(%i);
|
||||
|
||||
if(%api !$= "NullDevice")
|
||||
{
|
||||
if(%apiIdx==0)
|
||||
%apiList = %api;
|
||||
else
|
||||
%apiList = %apiList TAB %api;
|
||||
|
||||
%apiIdx++;
|
||||
}
|
||||
}
|
||||
|
||||
trim(%apiList);
|
||||
|
||||
OptionsMenuSettingsList.addOptionRow("Display API", %apiList, false, "", -1, -30, true, "The display API used for rendering.", %displayDevice);
|
||||
|
||||
%numDevices = Canvas.getMonitorCount();
|
||||
%devicesList = "";
|
||||
for(%i = 0; %i < %numDevices; %i++)
|
||||
{
|
||||
%device = (%i+1) @ " - " @ Canvas.getMonitorName(%i);
|
||||
if(%i==0)
|
||||
%devicesList = %device;
|
||||
else
|
||||
%devicesList = %devicesList @ "\t" @ %device;
|
||||
}
|
||||
|
||||
%selectedDevice = getField(%devicesList, $pref::Video::deviceId);
|
||||
OptionsMenuSettingsList.addOptionRow("Display Device", %devicesList, false, "onDisplayModeChange", -1, -30, true, "The display devices the window should be on.", %selectedDevice);
|
||||
|
||||
if (%numDevices > 1)
|
||||
OptionsMenuSettingsList.setRowEnabled(1, true);
|
||||
else
|
||||
OptionsMenuSettingsList.setRowEnabled(1, false);
|
||||
|
||||
%mode = getField($Video::ModeTags, $pref::Video::deviceMode);
|
||||
OptionsMenuSettingsList.addOptionRow("Window Mode", $Video::ModeTags, false, "onDisplayModeChange", -1, -30, true, "", %mode);
|
||||
|
||||
%resolutionList = getScreenResolutionList($pref::Video::deviceId, $pref::Video::deviceMode);
|
||||
OptionsMenuSettingsList.addOptionRow("Resolution", %resolutionList, false, "onDisplayResChange", -1, -30, true, "Resolution of the game window", _makePrettyResString( $pref::Video::mode ));
|
||||
|
||||
//If they're doing borderless, the window resolution must match the display resolution
|
||||
if(%mode !$= "Borderless")
|
||||
OptionsMenuSettingsList.setRowEnabled(3, true);
|
||||
else
|
||||
OptionsMenuSettingsList.setRowEnabled(3, false);
|
||||
|
||||
OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
|
||||
|
||||
|
||||
%refreshList = getScreenRefreshList($pref::Video::mode);
|
||||
OptionsMenuSettingsList.addOptionRow("Refresh Rate", %refreshList, false, "", -1, -30, true, "", $pref::Video::RefreshRate);
|
||||
|
||||
//move to gameplay tab
|
||||
OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", "", -1, -30);
|
||||
|
||||
OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", "", -1, -30);
|
||||
OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", "", -1, -30);
|
||||
|
||||
OptionsMenuSettingsList.refresh();
|
||||
}
|
||||
|
||||
function OptionsMenu::applyDisplaySettings(%this)
|
||||
{
|
||||
%newDevice = OptionsMenuSettingsList.getCurrentOption(0);
|
||||
|
||||
// Change the device.
|
||||
if ( %newDevice !$= $pref::Video::displayDevice )
|
||||
{
|
||||
$pref::Video::displayDevice = %newDevice;
|
||||
if( %newDevice !$= getDisplayDeviceInformation() )
|
||||
MessageBoxOK( "Change requires restart", "Please restart the game for a display device change to take effect." );
|
||||
|
||||
$changingDisplayDevice = %newDevice;
|
||||
}
|
||||
|
||||
updateDisplaySettings();
|
||||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function OptionsMenu::populateGraphicsSettingsList(%this)
|
||||
{
|
||||
%this.pageTabIndex = 1;
|
||||
OptionsMenuSettingsList.clearRows();
|
||||
|
||||
OptionName.setText("");
|
||||
OptionDescription.setText("");
|
||||
|
||||
%yesNoList = "No\tYes";
|
||||
%onOffList = "Off\tOn";
|
||||
%highMedLow = "Low\tMedium\tHigh";
|
||||
%anisoFilter = "Off\t4\t8\t16";
|
||||
%aaFilter = "Off\t1\t2\t4";
|
||||
OptionsMenuSettingsList.addOptionRow("Lighting Quality", getQualityLevels(LightingQualityList), false, "", -1, -30, true, "Amount and drawdistance of local lights", getCurrentQualityLevel(LightingQualityList));
|
||||
OptionsMenuSettingsList.addOptionRow("Shadow Quality", getQualityLevels(ShadowQualityList), false, "", -1, -30, true, "Shadow revolution quality", getCurrentQualityLevel(ShadowQualityList));
|
||||
OptionsMenuSettingsList.addOptionRow("Soft Shadow Quality", getQualityLevels(SoftShadowList), false, "", -1, -30, true, "Amount of softening applied to shadowmaps", getCurrentQualityLevel(SoftShadowList));
|
||||
OptionsMenuSettingsList.addOptionRow("Mesh Quality", getQualityLevels(MeshQualityGroup), false, "", -1, -30, true, "Fidelity of rendering of mesh objects", getCurrentQualityLevel(MeshQualityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Object Draw Distance", getQualityLevels(MeshDrawDistQualityGroup), false, "", -1, -30, true, "Dictates if and when static objects fade out in the distance", getCurrentQualityLevel(MeshDrawDistQualityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Texture Quality", getQualityLevels(TextureQualityGroup), false, "", -1, -30, true, "Fidelity of textures", getCurrentQualityLevel(TextureQualityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Terrain Quality", getQualityLevels(TerrainQualityGroup), false, "", -1, -30, true, "Quality level of terrain objects", getCurrentQualityLevel(TerrainQualityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Decal Lifetime", getQualityLevels(DecalLifetimeGroup), false, "", -1, -30, true, "How long decals are rendered", getCurrentQualityLevel(DecalLifetimeGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Ground Cover Density", getQualityLevels(GroundCoverDensityGroup), false, "", -1, -30, true, "Density of ground cover items, such as grass", getCurrentQualityLevel(GroundCoverDensityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Shader Quality", getQualityLevels(ShaderQualityGroup), false, "", -1, -30, true, "Dictates the overall shader quality level, adjusting what features are enabled.", getCurrentQualityLevel(ShaderQualityGroup));
|
||||
OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", %anisoFilter, false, "", -1, -30, true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance", $pref::Video::defaultAnisotropy);
|
||||
OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", %aaFilter, false, "", -1, -30, true, "Amount of Post-Processing Anti-Aliasing applied to rendering", $pref::Video::AA);
|
||||
OptionsMenuSettingsList.addOptionRow("Parallax", %onOffList, false, "", -1, -30, true, "Whether the surface parallax shader effect is enabled", convertBoolToOnOff(!$pref::Video::disableParallaxMapping));
|
||||
OptionsMenuSettingsList.addOptionRow("Water Reflections", %onOffList, false, "", -1, -30, true, "Whether water reflections are enabled", convertBoolToOnOff(!$pref::Water::disableTrueReflections));
|
||||
OptionsMenuSettingsList.addOptionRow("SSAO", %onOffList, false, "", -1, -30, true, "Whether Screen-Space Ambient Occlusion is enabled", convertBoolToOnOff($pref::PostFX::EnableSSAO));
|
||||
OptionsMenuSettingsList.addOptionRow("Depth of Field", %onOffList, false, "", -1, -30, true, "Whether the Depth of Field effect is enabled", convertBoolToOnOff($pref::PostFX::EnableDOF));
|
||||
OptionsMenuSettingsList.addOptionRow("Vignette", %onOffList, false, "", -1, -30, true, "Whether the vignette effect is enabled", convertBoolToOnOff($pref::PostFX::EnableVignette));
|
||||
OptionsMenuSettingsList.addOptionRow("Light Rays", %onOffList, false, "", -1, -30, true, "Whether the light rays effect is enabled", convertBoolToOnOff($pref::PostFX::EnableLightRays));
|
||||
|
||||
OptionsMenuSettingsList.refresh();
|
||||
}
|
||||
|
||||
function OptionsMenu::applyGraphicsSettings(%this)
|
||||
{
|
||||
LightingQualityList.applySetting(OptionsMenuSettingsList.getCurrentOption(0));
|
||||
ShadowQualityList.applySetting(OptionsMenuSettingsList.getCurrentOption(1));
|
||||
SoftShadowList.applySetting(OptionsMenuSettingsList.getCurrentOption(2));
|
||||
|
||||
MeshQualityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(3));
|
||||
MeshDrawDistQualityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(4));
|
||||
TextureQualityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(5));
|
||||
TerrainQualityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(6));
|
||||
DecalLifetimeGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(7));
|
||||
GroundCoverDensityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(8));
|
||||
ShaderQualityGroup.applySetting(OptionsMenuSettingsList.getCurrentOption(9));
|
||||
|
||||
//Update Textures
|
||||
reloadTextures();
|
||||
|
||||
//Update lighting
|
||||
// Set the light manager. This should do nothing
|
||||
// if its already set or if its not compatible.
|
||||
//setLightManager( $pref::lightManager );
|
||||
|
||||
$pref::PostFX::EnableSSAO = convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(14));
|
||||
$pref::PostFX::EnableDOF = convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(15));
|
||||
$pref::PostFX::EnableVignette = convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(16));
|
||||
$pref::PostFX::EnableLightRays = convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(17));
|
||||
|
||||
PostFXManager.settingsEffectSetEnabled(SSAOPostFx, $pref::PostFX::EnableSSAO);
|
||||
PostFXManager.settingsEffectSetEnabled(DOFPostEffect, $pref::PostFX::EnableDOF);
|
||||
PostFXManager.settingsEffectSetEnabled(LightRayPostFX, $pref::PostFX::EnableLightRays);
|
||||
PostFXManager.settingsEffectSetEnabled(vignettePostFX, $pref::PostFX::EnableVignette);
|
||||
|
||||
$pref::Video::disableParallaxMapping = !convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(12));
|
||||
|
||||
//water reflections
|
||||
$pref::Water::disableTrueReflections = !convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(13));
|
||||
|
||||
// Check the anisotropic filtering.
|
||||
%level = OptionsMenuSettingsList.getCurrentOption(10);
|
||||
if ( %level != $pref::Video::defaultAnisotropy )
|
||||
{
|
||||
$pref::Video::defaultAnisotropy = %level;
|
||||
}
|
||||
|
||||
%newFSAA = OptionsMenuSettingsList.getCurrentOption(11);
|
||||
if (%newFSAA $= "off")
|
||||
%newFSAA = 0;
|
||||
if (%newFSAA !$= $pref::Video::AA)
|
||||
{
|
||||
$pref::Video::AA = %newFSAA;
|
||||
configureCanvas();
|
||||
}
|
||||
|
||||
echo("Exporting client prefs");
|
||||
%prefPath = getPrefpath();
|
||||
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
|
||||
}
|
||||
|
||||
function updateDisplaySettings()
|
||||
{
|
||||
//Update the display settings now
|
||||
%deviceName = OptionsMenuSettingsList.getCurrentOption(1);
|
||||
%newDeviceID = getWord(%deviceName, 0) - 1;
|
||||
%deviceModeName = OptionsMenuSettingsList.getCurrentOption(2);
|
||||
%newDeviceMode = 0;
|
||||
foreach$(%modeName in $Video::ModeTags)
|
||||
{
|
||||
if (%deviceModeName $= %modeName)
|
||||
break;
|
||||
else
|
||||
%newDeviceMode++;
|
||||
}
|
||||
|
||||
%newRes = getWord(OptionsMenuSettingsList.getCurrentOption(3), 0) SPC getWord(OptionsMenuSettingsList.getCurrentOption(3), 2);
|
||||
%newBpp = 32; // ... its not 1997 anymore.
|
||||
%newFullScreen = %deviceModeName $= "Fullscreen" ? true : false;
|
||||
%newRefresh = OptionsMenuSettingsList.getCurrentOption(5);
|
||||
%newVsync = !convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(4));
|
||||
%newFSAA = $pref::Video::AA;
|
||||
|
||||
// Build the final mode string.
|
||||
%newMode = %newRes SPC %newFullScreen SPC %newBpp SPC %newRefresh SPC %newFSAA;
|
||||
|
||||
// Change the video mode.
|
||||
if ( %newMode !$= $pref::Video::mode || %newDeviceID != $pref::Video::deviceId ||
|
||||
%newVsync != $pref::Video::disableVerticalSync || %newDeviceMode != $pref::Video::deviceMode)
|
||||
{
|
||||
//****Edge Case Hack
|
||||
// If we're in fullscreen mode and switching to a different monitor at the
|
||||
// same resolution and maintaining fullscreen, GFX...WindowTarget::resetMode()
|
||||
// will early-out because there is no "mode change" and the monitor change
|
||||
// will not get applied. Instead of modifying platform code, we're going to
|
||||
// move onto the new monitor in borderless and immediately switch to FS.
|
||||
if (%newFullScreen && $pref::Video::FullScreen &&
|
||||
($pref::Video::Resolution $= %newRes) && ($pref::Video::deviceId != %newDeviceID))
|
||||
{
|
||||
$pref::Video::deviceId = %newDeviceID;
|
||||
$pref::Video::deviceMode = $Video::ModeBorderless;
|
||||
%tmpModeStr = Canvas.getMonitorMode(%newDeviceID, 0);
|
||||
Canvas.setVideoMode(%tmpModeStr.x, %tmpModeStr.y, false, 32, getWord(%tmpModeStr, $WORD::REFRESH), %newFSAA);
|
||||
}
|
||||
|
||||
$pref::Video::mode = %newMode;
|
||||
$pref::Video::disableVerticalSync = %newVsync;
|
||||
$pref::Video::deviceId = %newDeviceID;
|
||||
$pref::Video::deviceMode = %newDeviceMode;
|
||||
$pref::Video::Resolution = %newRes;
|
||||
$pref::Video::FullScreen = %newFullScreen;
|
||||
$pref::Video::RefreshRate = %newRefresh;
|
||||
$pref::Video::AA = %newFSAA;
|
||||
configureCanvas();
|
||||
}
|
||||
}
|
||||
|
||||
function OptionsMenu::populateAudioSettingsList(%this)
|
||||
{
|
||||
%this.pageTabIndex = 2;
|
||||
OptionsMenuSettingsList.clearRows();
|
||||
|
||||
OptionName.setText("");
|
||||
OptionDescription.setText("");
|
||||
|
||||
%buffer = sfxGetAvailableDevices();
|
||||
%count = getRecordCount( %buffer );
|
||||
%audioDriverList = "";
|
||||
%audioProviderList = "";
|
||||
%audioDeviceList = "";
|
||||
|
||||
$currentAudioProvider = $currentAudioProvider $= "" ? $pref::SFX::provider : $currentAudioProvider;
|
||||
|
||||
for(%i = 0; %i < %count; %i++)
|
||||
{
|
||||
%record = getRecord(%buffer, %i);
|
||||
%provider = getField(%record, 0);
|
||||
%device = getField(%record, 1);
|
||||
|
||||
//When the client is actually running, we don't care about null audo devices
|
||||
if(%provider $= "null")
|
||||
continue;
|
||||
|
||||
if(%audioProviderList $= "")
|
||||
%audioProviderList = %provider;
|
||||
else
|
||||
%audioProviderList = %audioProviderList @ "\t" @ %provider;
|
||||
|
||||
if(%provider $= $currentAudioProvider)
|
||||
{
|
||||
if(%audioDeviceList $= "")
|
||||
%audioDeviceList = %device;
|
||||
else
|
||||
%audioDeviceList = %audioDeviceList @ "\t" @ %device;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
OptionsMenuSettingsList.addOptionRow("Audio Provider", %audioProviderList, false, "audioProviderChanged", -1, -15, true, "", $currentAudioProvider);
|
||||
OptionsMenuSettingsList.addOptionRow("Audio Device", %audioDeviceList, false, "", -1, -15, true, $pref::SFX::device);
|
||||
|
||||
OptionsMenuSettingsList.addSliderRow("Master Volume", $pref::SFX::masterVolume, 0.1, "0 1", "", -1, -30);
|
||||
OptionsMenuSettingsList.addSliderRow("GUI Volume", $pref::SFX::channelVolume[ $GuiAudioType], 0.1, "0 1", "", -1, -30);
|
||||
OptionsMenuSettingsList.addSliderRow("Effects Volume", $pref::SFX::channelVolume[ $SimAudioType ], 0.1, "0 1", "", -1, -30);
|
||||
OptionsMenuSettingsList.addSliderRow("Music Volume", $pref::SFX::channelVolume[ $MusicAudioType ], 0.1, "0 1", "", -1, -30);
|
||||
|
||||
OptionsMenuSettingsList.refresh();
|
||||
}
|
||||
|
||||
function audioProviderChanged()
|
||||
{
|
||||
//Get the option we have set for the provider
|
||||
%provider = OptionsMenuSettingsList.getCurrentOption(0);
|
||||
$currentAudioProvider = %provider;
|
||||
|
||||
//And now refresh the list to get the correct devices
|
||||
OptionsMenu.populateAudioSettingsList();
|
||||
}
|
||||
|
||||
function OptionsMenu::applyAudioSettings(%this)
|
||||
{
|
||||
$pref::SFX::masterVolume = OptionsMenuSettingsList.getValue(2);
|
||||
sfxSetMasterVolume( $pref::SFX::masterVolume );
|
||||
|
||||
$pref::SFX::channelVolume[ $GuiAudioType ] = OptionsMenuSettingsList.getValue(3);
|
||||
$pref::SFX::channelVolume[ $SimAudioType ] = OptionsMenuSettingsList.getValue(4);
|
||||
$pref::SFX::channelVolume[ $MusicAudioType ] = OptionsMenuSettingsList.getValue(5);
|
||||
|
||||
sfxSetChannelVolume( $GuiAudioType, $pref::SFX::channelVolume[ $GuiAudioType ] );
|
||||
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
|
||||
sfxSetChannelVolume( $MusicAudioType, $pref::SFX::channelVolume[ $MusicAudioType ] );
|
||||
|
||||
$pref::SFX::provider = OptionsMenuSettingsList.getCurrentOption(0);
|
||||
$pref::SFX::device = OptionsMenuSettingsList.getCurrentOption(1);
|
||||
|
||||
if ( !sfxCreateDevice( $pref::SFX::provider,
|
||||
$pref::SFX::device,
|
||||
$pref::SFX::useHardware,
|
||||
-1 ) )
|
||||
error( "Unable to create SFX device: " @ $pref::SFX::provider
|
||||
SPC $pref::SFX::device
|
||||
SPC $pref::SFX::useHardware );
|
||||
|
||||
if( !isObject( $AudioTestHandle ) )
|
||||
{
|
||||
sfxPlay(menuButtonPressed);
|
||||
}
|
||||
}
|
||||
|
||||
function OptionsMenu::populateKeyboardMouseSettingsList(%this)
|
||||
{
|
||||
%this.pageTabIndex = 3;
|
||||
OptionsMenuSettingsList.clearRows();
|
||||
|
||||
OptionName.setText("");
|
||||
OptionDescription.setText("");
|
||||
|
||||
$remapListDevice = "keyboard";
|
||||
fillRemapList();
|
||||
|
||||
OptionsMenuSettingsList.refresh();
|
||||
}
|
||||
|
||||
function OptionsMenu::populateGamepadSettingsList(%this)
|
||||
{
|
||||
%this.pageTabIndex = 4;
|
||||
OptionsMenuSettingsList.clearRows();
|
||||
|
||||
OptionName.setText("");
|
||||
OptionDescription.setText("");
|
||||
|
||||
$remapListDevice = "gamepad";
|
||||
fillRemapList();
|
||||
|
||||
OptionsMenuSettingsList.refresh();
|
||||
}
|
||||
|
||||
function OptionsMenuList::activateRow(%this)
|
||||
{
|
||||
OptionsMenuSettingsList.setFirstResponder();
|
||||
}
|
||||
|
||||
function OptionsMenu::backOut(%this)
|
||||
{
|
||||
//save the settings and then back out
|
||||
if(OptionsMain.hidden == false)
|
||||
{
|
||||
//we're not in a specific menu, so we're actually exiting
|
||||
Canvas.popDialog(OptionsMenu);
|
||||
|
||||
if(isObject(OptionsMenu.returnGui) && OptionsMenu.returnGui.isMethod("onReturnTo"))
|
||||
OptionsMenu.returnGui.onReturnTo();
|
||||
}
|
||||
else
|
||||
{
|
||||
OptionsMain.hidden = false;
|
||||
ControlsMenu.hidden = true;
|
||||
GraphicsMenu.hidden = true;
|
||||
CameraMenu.hidden = true;
|
||||
AudioMenu.hidden = true;
|
||||
ScreenBrightnessMenu.hidden = true;
|
||||
}
|
||||
}
|
||||
|
||||
function convertOptionToBool(%val)
|
||||
{
|
||||
if(%val $= "yes" || %val $= "on")
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
function convertBoolToYesNo(%val)
|
||||
{
|
||||
if(%val == 1)
|
||||
return "Yes";
|
||||
else
|
||||
return "No";
|
||||
}
|
||||
|
||||
function convertBoolToOnOff(%val)
|
||||
{
|
||||
if(%val == 1)
|
||||
return "On";
|
||||
else
|
||||
return "Off";
|
||||
}
|
||||
|
||||
function onDisplayModeChange(%val)
|
||||
{
|
||||
// The display device (monitor) or screen mode has changed. Refill the
|
||||
// resolution list with only available options.
|
||||
%deviceName = OptionsMenuSettingsList.getCurrentOption(1);
|
||||
%newDeviceID = getWord(%deviceName, 0) - 1;
|
||||
%deviceModeName = OptionsMenuSettingsList.getCurrentOption(2);
|
||||
%newDeviceMode = 0;
|
||||
foreach$(%modeName in $Video::ModeTags)
|
||||
{
|
||||
if (%deviceModeName $= %modeName)
|
||||
break;
|
||||
else
|
||||
%newDeviceMode++;
|
||||
}
|
||||
%resolutionList = getScreenResolutionList(%newDeviceID, %newDeviceMode);
|
||||
|
||||
if (%newDeviceMode == $Video::ModeBorderless)
|
||||
{ // If we're switching to borderless, default to monitor res on Windows OS,
|
||||
// monitor usable area for other platforms.
|
||||
if ($platform $= "windows")
|
||||
%newRes = getWords(Canvas.getMonitorRect(%newDeviceID), 2);
|
||||
else
|
||||
%newRes = getWords(Canvas.getMonitorUsableRect(%newDeviceID), 2);
|
||||
}
|
||||
else
|
||||
{ // Otherwise, if our old resolution is still in the list, attempt to reset it.
|
||||
%oldRes = getWord(OptionsMenuSettingsList.getCurrentOption(3), 0) SPC getWord(OptionsMenuSettingsList.getCurrentOption(3), 2);
|
||||
|
||||
%found = false;
|
||||
%retCount = getFieldCount(%resolutionList);
|
||||
for (%i = 0; %i < %retCount; %i++)
|
||||
{
|
||||
%existingEntry = getField(%resolutionList, %i);
|
||||
if ((%existingEntry.x $= %oldRes.x) && (%existingEntry.z $= %oldRes.y))
|
||||
{
|
||||
%found = true;
|
||||
%newRes = %oldRes;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!%found)
|
||||
{ // Pick the best resoltion available for the device and mode
|
||||
%newRes = Canvas.getBestCanvasRes(%newDeviceID, %newDeviceMode);
|
||||
}
|
||||
}
|
||||
|
||||
if(%newDeviceMode == $Video::ModeBorderless)
|
||||
OptionsMenuSettingsList.setRowEnabled(3, false);
|
||||
else
|
||||
OptionsMenuSettingsList.setRowEnabled(3, true);
|
||||
|
||||
OptionsMenuSettingsList.setOptions(3, %resolutionList);
|
||||
OptionsMenuSettingsList.selectOption(3, _makePrettyResString(%newRes));
|
||||
}
|
||||
|
||||
function onDisplayResChange(%val)
|
||||
{ // The resolution has changed. Setup refresh rates available at this res.
|
||||
%newRes = getWord(OptionsMenuSettingsList.getCurrentOption(3), 0) SPC getWord(OptionsMenuSettingsList.getCurrentOption(3), 2);
|
||||
%refreshList = getScreenRefreshList(%newRes);
|
||||
|
||||
// If our old rate still exists, select it
|
||||
%oldRate = OptionsMenuSettingsList.getCurrentOption(5);
|
||||
%retCount = getFieldCount(%refreshList);
|
||||
for (%i = 0; %i < %retCount; %i++)
|
||||
{
|
||||
%existingEntry = getField(%refreshList, %i);
|
||||
%newRate = %existingEntry;
|
||||
if (%existingEntry $= %oldRate)
|
||||
break;
|
||||
}
|
||||
|
||||
OptionsMenuSettingsList.setOptions(5, %refreshList);
|
||||
OptionsMenuSettingsList.selectOption(5, %newRate);
|
||||
}
|
||||
151
Templates/BaseGame/game/data/UI/guis/pauseMenu.gui
Normal file
|
|
@ -0,0 +1,151 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(PauseMenu) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
tamlReader = "19772";
|
||||
tile = "0";
|
||||
useVariable = "0";
|
||||
|
||||
new GuiChunkedBitmapCtrl(PauseMenuBG) {
|
||||
bitmapAsset = "UI:hudfill_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "162 125";
|
||||
extent = "700 518";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiGameListMenuCtrl(PauseMenuList) {
|
||||
debugRender = "0";
|
||||
callbackOnInputs = "1";
|
||||
consumeKeyInputEvents = "1";
|
||||
position = "0 0";
|
||||
extent = "700 320";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "DefaultListMenuProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
class = "UIMenuButtonList";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
new GuiControl(PauseButtonHolder) {
|
||||
position = "189 711";
|
||||
extent = "646 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "top";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
class = "MenuInputButtonContainer";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "OK";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "363 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "PauseMenuList.activateRow();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "goButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiIconButtonCtrl() {
|
||||
buttonMargin = "4 4";
|
||||
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
|
||||
iconLocation = "Left";
|
||||
sizeIconToButton = "1";
|
||||
makeIconSquare = "1";
|
||||
textLocation = "Right";
|
||||
textMargin = "4";
|
||||
autoSize = "0";
|
||||
text = "Back";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "507 0";
|
||||
extent = "140 40";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "Canvas.popDialog();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
internalName = "backButton";
|
||||
class = "MenuInputButton";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
66
Templates/BaseGame/game/data/UI/guis/pauseMenu.tscript
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
function PauseMenu::onWake(%this)
|
||||
{
|
||||
if($Server::ServerType $= "SinglePlayer")
|
||||
{
|
||||
$timescale = 0;
|
||||
|
||||
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ 0 ] );
|
||||
}
|
||||
|
||||
PauseMenuList.hidden = false;
|
||||
PauseMenuList.setFirstResponder();
|
||||
PauseButtonHolder.setActive();
|
||||
|
||||
PauseMenuList.clearRows();
|
||||
|
||||
if($Tools::loaded && EditorIsActive())
|
||||
{
|
||||
PauseMenuList.addRow("Exit Editor", "fastLoadWorldEdit", -1, -30);
|
||||
}
|
||||
|
||||
PauseMenuList.addRow("Options", "openPauseMenuOptions", -1, -30);
|
||||
PauseMenuList.addRow("Exit to Menu", "pauseMenuExitToMenu", -1, -30);
|
||||
PauseMenuList.addRow("Exit to Desktop", "pauseMenuExitToDesktop", -1, -30);
|
||||
}
|
||||
|
||||
|
||||
function PauseMenu::onSleep(%this)
|
||||
{
|
||||
if($Server::ServerType $= "SinglePlayer")
|
||||
{
|
||||
$timescale = 1;
|
||||
sfxSetChannelVolume( $SimAudioType, $pref::SFX::channelVolume[ $SimAudioType ] );
|
||||
}
|
||||
}
|
||||
|
||||
function PauseMenu::onReturnTo(%this)
|
||||
{
|
||||
PauseMenuList.hidden = false;
|
||||
PauseMenuList.setFirstResponder();
|
||||
PauseButtonHolder.setActive();
|
||||
}
|
||||
|
||||
function openPauseMenuOptions()
|
||||
{
|
||||
Canvas.pushDialog(OptionsMenu);
|
||||
OptionsMenu.returnGui = PauseMenu;
|
||||
PauseMenuList.hidden = true;
|
||||
}
|
||||
|
||||
function pauseMenuExitToMenu()
|
||||
{
|
||||
PauseMenuList.hidden = true;
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the Main Menu?", "escapeFromGame();", "PauseMenu.onReturnTo();");
|
||||
}
|
||||
|
||||
function pauseMenuExitToDesktop()
|
||||
{
|
||||
PauseMenuList.hidden = true;
|
||||
MessageBoxOKCancel("Exit?", "Do you wish to exit to the desktop?", "quit();", "PauseMenu.onReturnTo();");
|
||||
}
|
||||
|
||||
function PauseButtonHolder::onWake(%this)
|
||||
{
|
||||
%this-->goButton.set("btn_a", "Return", "OK", "PauseMenuList.activateRow();", true);
|
||||
%this-->backButton.set("btn_b", "Escape", "Back", "Canvas.popDialog();");
|
||||
}
|
||||
324
Templates/BaseGame/game/data/UI/guis/profiler.gui
Normal file
|
|
@ -0,0 +1,324 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(ProfilerGui) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
|
||||
new GuiWindowCtrl(ppProfilerWindow) {
|
||||
text = "Profiler Manager";
|
||||
resizeWidth = "0";
|
||||
resizeHeight = "0";
|
||||
canMove = "1";
|
||||
canClose = "1";
|
||||
canMinimize = "0";
|
||||
canMaximize = "0";
|
||||
canCollapse = "0";
|
||||
closeCommand = "Canvas.popDialog(ProfilerGui);";
|
||||
edgeSnap = "0";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "306 216";
|
||||
extent = "415 199";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiWindowProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiCheckBoxCtrl(ppShowFps) {
|
||||
text = "Show Fps";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 24";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Fps counter";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowGfx) {
|
||||
text = "Show Gfx";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 40";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Gfx";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowShadow) {
|
||||
text = "Show Shadow";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 56";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Shdow";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowNet) {
|
||||
text = "Show Net";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 136";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Network activity";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowForest) {
|
||||
text = "Show Forest";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 120";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Forest";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowGroundcover) {
|
||||
text = "Show Groundcover";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 104";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Groundcover";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowTerrain) {
|
||||
text = "Show Terrain";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 88";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Terrain";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiCheckBoxCtrl(ppShowSfx) {
|
||||
text = "Show Sfx";
|
||||
groupNum = "-1";
|
||||
buttonType = "ToggleButton";
|
||||
useMouseEvents = "0";
|
||||
position = "13 72";
|
||||
extent = "127 30";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiCheckBoxProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Enable or Disable the Sfx";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(ppOptionsEnableDisable) {
|
||||
text = "On/Off OSD";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "309 38";
|
||||
extent = "93 23";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "showMetrics(true);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Apply the setting from the dialog box";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(ppOptionsUpdate) {
|
||||
text = "Update";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "200 38";
|
||||
extent = "93 23";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "showMetrics(false);";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Update the profiler with the new parameters";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(ppOptionsDoProfiling) {
|
||||
text = "DoProfiling";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "309 141";
|
||||
extent = "93 23";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "doProfileFromGui();";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
tooltip = "Does the profile for the ammount of time specified ";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(DurationLabel) {
|
||||
text = "Duration[ms]";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "200 144";
|
||||
extent = "39 21";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextRightProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextEditCtrl(Duration) {
|
||||
historySize = "0";
|
||||
tabComplete = "0";
|
||||
sinkAllKeyEvents = "0";
|
||||
password = "0";
|
||||
passwordMask = "*";
|
||||
text = "1000";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "249 144";
|
||||
extent = "53 18";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiTextEditProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
367
Templates/BaseGame/game/data/UI/guis/profiler.tscript
Normal file
|
|
@ -0,0 +1,367 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
$MetricsParamArray[0] = "fps ";
|
||||
$MetricsParamArray[1] = "shadow ";
|
||||
$MetricsParamArray[2] = "gfx ";
|
||||
$MetricsParamArray[3] = "sfx ";
|
||||
$MetricsParamArray[4] = "terrain ";
|
||||
$MetricsParamArray[5] = "groundcover ";
|
||||
$MetricsParamArray[6] = "forest ";
|
||||
$MetricsParamArray[7] = "net ";
|
||||
$EnableProfiler = false;
|
||||
$string = ""; //string used to collet the parameters for metrics function
|
||||
|
||||
function showMetrics(%var)
|
||||
{
|
||||
$string = "";
|
||||
if(ppShowFps.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[0];
|
||||
}
|
||||
if(ppShowShadow.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[1];
|
||||
}
|
||||
if(ppShowGfx.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[2];
|
||||
}
|
||||
if(ppShowSfx.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[3];
|
||||
}
|
||||
if(ppShowTerrain.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[4];
|
||||
}
|
||||
if(ppShowForest.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[5];
|
||||
}
|
||||
if(ppShowGroundcover.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[6];
|
||||
}
|
||||
if(ppShowNet.getValue())
|
||||
{
|
||||
$string = $string @ $MetricsParamArray[7];
|
||||
}
|
||||
|
||||
if(%var)
|
||||
{
|
||||
$EnableProfiler = !($EnableProfiler);
|
||||
|
||||
if($EnableProfiler)
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
else if((false == $EnableProfiler))
|
||||
{
|
||||
metrics();
|
||||
}
|
||||
}
|
||||
else if($EnableProfiler) //will enter only when the enable/disable button was pressed
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
}
|
||||
|
||||
function showMetics(%var)
|
||||
{
|
||||
if(%var)
|
||||
{
|
||||
metrics($string);
|
||||
}
|
||||
else if(true == $EnableProfiler)
|
||||
{
|
||||
$EnableProfiler = false;
|
||||
metrics();
|
||||
}
|
||||
}
|
||||
|
||||
GlobalActionMap.bind(keyboard, "ctrl F2", showMetics);
|
||||
|
||||
$guiContent = new GuiControl(FrameOverlayGui) {
|
||||
profile = "GuiModelessDialogProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "640 480";
|
||||
minExtent = "8 8";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "false";
|
||||
helpTag = "0";
|
||||
noCursor = true;
|
||||
new GuiConsoleTextCtrl(TextOverlayControl) {
|
||||
profile = "GuiConsoleTextProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "5 5";
|
||||
extent = "130 18";
|
||||
minExtent = "4 4";
|
||||
visible = "True";
|
||||
setFirstResponder = "True";
|
||||
modal = "True";
|
||||
helpTag = "0";
|
||||
expression = "10";
|
||||
command = "Canvas.popDialog(FrameOverlayGui);";
|
||||
accelerator = "escape";
|
||||
};
|
||||
};
|
||||
|
||||
// Note: To implement your own metrics overlay
|
||||
// just add a function with a name in the form
|
||||
// XXXXMetricsCallback which can be enabled via
|
||||
// metrics( XXXX )
|
||||
|
||||
function fpsMetricsCallback()
|
||||
{
|
||||
return " | FPS |" @
|
||||
" " @ $fps::real @
|
||||
" max: " @ $fps::realMax @
|
||||
" min: " @ $fps::realMin @
|
||||
" mspf: " @ 1000 / $fps::real;
|
||||
}
|
||||
|
||||
function gfxMetricsCallback()
|
||||
{
|
||||
return " | GFX |" @
|
||||
" PolyCount: " @ $GFXDeviceStatistics::polyCount @
|
||||
" DrawCalls: " @ $GFXDeviceStatistics::drawCalls @
|
||||
" RTChanges: " @ $GFXDeviceStatistics::renderTargetChanges;
|
||||
|
||||
}
|
||||
|
||||
function terrainMetricsCallback()
|
||||
{
|
||||
return " | Terrain |" @
|
||||
" Cells: " @ $TerrainBlock::cellsRendered @
|
||||
" Override Cells: " @ $TerrainBlock::overrideCells @
|
||||
" DrawCalls: " @ $TerrainBlock::drawCalls;
|
||||
}
|
||||
|
||||
function netMetricsCallback()
|
||||
{
|
||||
return " | Net |" @
|
||||
" BitsSent: " @ $Stats::netBitsSent @
|
||||
" BitsRcvd: " @ $Stats::netBitsReceived @
|
||||
" GhostUpd: " @ $Stats::netGhostUpdates;
|
||||
}
|
||||
|
||||
function groundCoverMetricsCallback()
|
||||
{
|
||||
return " | GroundCover |" @
|
||||
" Cells: " @ $GroundCover::renderedCells @
|
||||
" Billboards: " @ $GroundCover::renderedBillboards @
|
||||
" Batches: " @ $GroundCover::renderedBatches @
|
||||
" Shapes: " @ $GroundCover::renderedShapes;
|
||||
}
|
||||
|
||||
function forestMetricsCallback()
|
||||
{
|
||||
return " | Forest |" @
|
||||
" Cells: " @ $Forest::totalCells @
|
||||
" Cells Meshed: " @ $Forest::cellsRendered @
|
||||
" Cells Billboarded: " @ $Forest::cellsBatched @
|
||||
" Meshes: " @ $Forest::cellItemsRendered @
|
||||
" Billboards: " @ $Forest::cellItemsBatched;
|
||||
}
|
||||
|
||||
function sfxMetricsCallback()
|
||||
{
|
||||
return " | SFX |" @
|
||||
" Sounds: " @ $SFX::numSounds @
|
||||
" Lists: " @ ( $SFX::numSources - $SFX::numSounds - $SFX::Device::fmodNumEventSource ) @
|
||||
" Events: " @ $SFX::fmodNumEventSources @
|
||||
" Playing: " @ $SFX::numPlaying @
|
||||
" Culled: " @ $SFX::numCulled @
|
||||
" Voices: " @ $SFX::numVoices @
|
||||
" Buffers: " @ $SFX::Device::numBuffers @
|
||||
" Memory: " @ ( $SFX::Device::numBufferBytes / 1024.0 / 1024.0 ) @ " MB" @
|
||||
" Time/S: " @ $SFX::sourceUpdateTime @
|
||||
" Time/P: " @ $SFX::parameterUpdateTime @
|
||||
" Time/A: " @ $SFX::ambientUpdateTime;
|
||||
}
|
||||
|
||||
function sfxSourcesMetricsCallback()
|
||||
{
|
||||
return sfxDumpSourcesToString();
|
||||
}
|
||||
|
||||
function sfxStatesMetricsCallback()
|
||||
{
|
||||
return " | SFXStates |" @ sfxGetActiveStates();
|
||||
}
|
||||
|
||||
function timeMetricsCallback()
|
||||
{
|
||||
return " | Time |" @
|
||||
" Sim Time: " @ getSimTime() @
|
||||
" Mod: " @ getSimTime() % 32;
|
||||
}
|
||||
|
||||
function reflectMetricsCallback()
|
||||
{
|
||||
return " | REFLECT |" @
|
||||
" Objects: " @ $Reflect::numObjects @
|
||||
" Visible: " @ $Reflect::numVisible @
|
||||
" Occluded: " @ $Reflect::numOccluded @
|
||||
" Updated: " @ $Reflect::numUpdated @
|
||||
" Elapsed: " @ $Reflect::elapsed NL
|
||||
|
||||
" Allocated: " @ $Reflect::renderTargetsAllocated @
|
||||
" Pooled: " @ $Reflect::poolSize NL
|
||||
|
||||
" " @ getWord( $Reflect::textureStats, 1 ) TAB
|
||||
" " @ getWord( $Reflect::textureStats, 2 ) @ "MB" TAB
|
||||
" " @ getWord( $Reflect::textureStats, 0 );
|
||||
}
|
||||
|
||||
function decalMetricsCallback()
|
||||
{
|
||||
return " | DECAL |" @
|
||||
" Batches: " @ $Decal::Batches @
|
||||
" Buffers: " @ $Decal::Buffers @
|
||||
" DecalsRendered: " @ $Decal::DecalsRendered;
|
||||
}
|
||||
|
||||
function renderMetricsCallback()
|
||||
{
|
||||
return " | Render |" @
|
||||
" Mesh: " @ $RenderMetrics::RIT_Mesh @
|
||||
" MeshDL: " @ $RenderMetrics::RIT_MeshDynamicLighting @
|
||||
" Shadow: " @ $RenderMetrics::RIT_Shadow @
|
||||
" Sky: " @ $RenderMetrics::RIT_Sky @
|
||||
" Obj: " @ $RenderMetrics::RIT_Object @
|
||||
" ObjT: " @ $RenderMetrics::RIT_ObjectTranslucent @
|
||||
" Decal: " @ $RenderMetrics::RIT_Decal @
|
||||
" Water: " @ $RenderMetrics::RIT_Water @
|
||||
" Foliage: " @ $RenderMetrics::RIT_Foliage @
|
||||
" Trans: " @ $RenderMetris::RIT_Translucent @
|
||||
" Custom: " @ $RenderMetrics::RIT_Custom;
|
||||
}
|
||||
|
||||
function shadowMetricsCallback()
|
||||
{
|
||||
return " | Shadow |" @
|
||||
" Active: " @ $ShadowStats::activeMaps @
|
||||
" Updated: " @ $ShadowStats::updatedMaps @
|
||||
" PolyCount: " @ $ShadowStats::polyCount @
|
||||
" DrawCalls: " @ $ShadowStats::drawCalls @
|
||||
" RTChanges: " @ $ShadowStats::rtChanges @
|
||||
" PoolTexCount: " @ $ShadowStats::poolTexCount @
|
||||
" PoolTexMB: " @ $ShadowStats::poolTexMemory @ "MB";
|
||||
}
|
||||
|
||||
function basicShadowMetricsCallback()
|
||||
{
|
||||
return " | Shadow |" @
|
||||
" Active: " @ $BasicLightManagerStats::activePlugins @
|
||||
" Updated: " @ $BasicLightManagerStats::shadowsUpdated @
|
||||
" Elapsed Ms: " @ $BasicLightManagerStats::elapsedUpdateMs;
|
||||
}
|
||||
|
||||
function lightMetricsCallback()
|
||||
{
|
||||
return " | Deferred Lights |" @
|
||||
" Active: " @ $lightMetrics::activeLights @
|
||||
" Culled: " @ $lightMetrics::culledLights;
|
||||
}
|
||||
|
||||
function particleMetricsCallback()
|
||||
{
|
||||
return " | Particles |" @
|
||||
" # Simulated " @ $particle::numSimulated;
|
||||
}
|
||||
function partMetricsCallback()
|
||||
{
|
||||
return particleMetricsCallback();
|
||||
}
|
||||
|
||||
function imposterMetricsCallback()
|
||||
{
|
||||
return " | IMPOSTER |" @
|
||||
" Rendered: " @ $ImposterStats::rendered @
|
||||
" Batches: " @ $ImposterStats::batches @
|
||||
" DrawCalls: " @ $ImposterStats::drawCalls @
|
||||
" Polys: " @ $ImposterStats::polyCount @
|
||||
" RtChanges: " @ $ImposterStats::rtChanges;
|
||||
}
|
||||
|
||||
// alias
|
||||
function audioMetricsCallback()
|
||||
{
|
||||
return sfxMetricsCallback();
|
||||
}
|
||||
|
||||
// alias
|
||||
function videoMetricsCallback()
|
||||
{
|
||||
return gfxMetricsCallback();
|
||||
}
|
||||
|
||||
// Add a metrics HUD. %expr can be a vector of names where each element
|
||||
// must have a corresponding '<name>MetricsCallback()' function defined
|
||||
// that will be called on each update of the GUI control. The results
|
||||
// of each function are stringed together.
|
||||
//
|
||||
// Example: metrics( "fps gfx" );
|
||||
|
||||
function metrics( %expr )
|
||||
{
|
||||
%metricsExpr = "";
|
||||
if( %expr !$= "" )
|
||||
{
|
||||
for( %i = 0;; %i ++ )
|
||||
{
|
||||
%name = getWord( %expr, %i );
|
||||
if( %name $= "" )
|
||||
break;
|
||||
else
|
||||
{
|
||||
%cb = %name @ "MetricsCallback";
|
||||
if( !isFunction( %cb ) )
|
||||
error( "metrics - undefined callback: " @ %cb );
|
||||
else
|
||||
{
|
||||
%cb = %cb @ "()";
|
||||
if( %i > 0 )
|
||||
%metricsExpr = %metricsExpr @ " NL ";
|
||||
%metricsExpr = %metricsExpr @ %cb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( %metricsExpr !$= "" )
|
||||
%metricsExpr = %metricsExpr @ " @ \" \"";
|
||||
}
|
||||
|
||||
if( %metricsExpr !$= "" )
|
||||
{
|
||||
$GameCanvas.pushDialog( FrameOverlayGui, 1000 );
|
||||
TextOverlayControl.setValue( %metricsExpr );
|
||||
}
|
||||
else
|
||||
$GameCanvas.popDialog(FrameOverlayGui);
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<GUIAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="recordingsDlg"
|
||||
scriptFile="@assetFile=RecordingsDlg.gui"
|
||||
GUIFile="@assetFile=RecordingsDlg.gui"
|
||||
VersionId="1" />
|
||||
125
Templates/BaseGame/game/data/UI/guis/remapConfirmDlg.gui
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(RemapConfirmDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiContainer(RemapConfirmationPanel) {
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "168 352";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiChunkedBitmapCtrl() {
|
||||
bitmapAsset = "UI:hudfill_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl(RemapConfirmationText) {
|
||||
text = "\"m\" is already bound to \"Forward\"!\nDo you wish to replace this mapping?";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 8";
|
||||
extent = "700 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
accelerator = "return";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(RemapConfirmationYesButton) {
|
||||
text = "Yes";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "270 36";
|
||||
extent = "80 22";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "ControlsMenu.redoMapping(keyboard, \"m\", \"jump\", 0, 4); Canvas.popDialog();";
|
||||
accelerator = "return";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiButtonCtrl(RemapConfirmationNoButton) {
|
||||
text = "No";
|
||||
groupNum = "-1";
|
||||
buttonType = "PushButton";
|
||||
useMouseEvents = "0";
|
||||
position = "367 36";
|
||||
extent = "80 22";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "top";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "Canvas.popDialog();";
|
||||
accelerator = "escape";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
122
Templates/BaseGame/game/data/UI/guis/remapDlg.gui
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiControl(RemapDlg) {
|
||||
position = "0 0";
|
||||
extent = "1024 768";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
helpTag = "0";
|
||||
|
||||
new GuiContainer(RemapPanel) {
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "162 352";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiInputCtrl(OptRemapInputCtrl) {
|
||||
lockMouse = "0";
|
||||
position = "480 0";
|
||||
extent = "64 64";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiInputCtrlProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiChunkedBitmapCtrl() {
|
||||
bitmapAsset = "UI:hudfill_image";
|
||||
useVariable = "0";
|
||||
tile = "0";
|
||||
position = "0 0";
|
||||
extent = "700 64";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Press escape to cancel";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "247 34";
|
||||
extent = "242 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Re-bind \"\" to...";
|
||||
maxLength = "255";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "177 8";
|
||||
extent = "384 20";
|
||||
minExtent = "8 8";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
internalName = "OptRemapText";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
79
Templates/BaseGame/game/data/UI/guis/startupGui.gui
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
//--- OBJECT WRITE BEGIN ---
|
||||
$guiContent = new GuiFadeinBitmapCtrl(StartupGui) {
|
||||
canSaveDynamicFields = "0";
|
||||
Enabled = "1";
|
||||
isContainer = "1";
|
||||
Profile = "GuiInputCtrlProfile";
|
||||
HorizSizing = "right";
|
||||
VertSizing = "bottom";
|
||||
position = "0 0";
|
||||
Extent = "800 600";
|
||||
MinExtent = "8 8";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
bitmapAsset = "";
|
||||
wrap = "0";
|
||||
fadeinTime = "1000";
|
||||
waitTime = "4000";
|
||||
fadeoutTime = "1000";
|
||||
done = "1";
|
||||
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "1";
|
||||
internalName = "StartupLogo";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "center";
|
||||
VertSizing = "center";
|
||||
position = "399 302";
|
||||
Extent = "253 253";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
bitmap = "";
|
||||
wrap = "0";
|
||||
command = "StartupGui.click();";
|
||||
};
|
||||
new GuiBitmapButtonCtrl() {
|
||||
canSaveDynamicFields = "1";
|
||||
internalName = "StartupLogoSecondary";
|
||||
Enabled = "1";
|
||||
isContainer = "0";
|
||||
Profile = "GuiDefaultProfile";
|
||||
HorizSizing = "left";
|
||||
VertSizing = "top";
|
||||
position = "275 440";
|
||||
Extent = "530 171";
|
||||
MinExtent = "8 2";
|
||||
canSave = "1";
|
||||
Visible = "1";
|
||||
tooltipprofile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
bitmap = "";
|
||||
wrap = "0";
|
||||
command = "StartupGui.click();";
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
//--- OBJECT WRITE BEGIN ---
|
||||
new GuiFadeinBitmapCtrl(BlankGui) {
|
||||
profile = "GuiInputCtrlProfile";
|
||||
horizSizing = "right";
|
||||
vertSizing = "bottom";
|
||||
position = "0 0";
|
||||
extent = "800 600";
|
||||
minExtent = "8 8";
|
||||
visible = "1";
|
||||
helpTag = "0";
|
||||
bitmapAsset = "";
|
||||
wrap = "0";
|
||||
fadeinTime = "100";
|
||||
waitTime = "2000";
|
||||
fadeoutTime = "100";
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
159
Templates/BaseGame/game/data/UI/guis/startupGui.tscript
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (c) 2012 GarageGames, LLC
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to
|
||||
// deal in the Software without restriction, including without limitation the
|
||||
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
// sell copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
// IN THE SOFTWARE.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// StartupGui is the splash screen that initially shows when the game is loaded
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
function loadStartup()
|
||||
{
|
||||
// The index of the current splash screen
|
||||
$StartupIdx = 0;
|
||||
|
||||
// A list of the splash screens and logos
|
||||
// to cycle through. Note that they have to
|
||||
// be in consecutive numerical order
|
||||
StartupGui.bitmap[0] = "UI:background_dark_image";
|
||||
StartupGui.logo[0] = "UI:Torque_3D_logo_alt_image";
|
||||
StartupGui.logoPos[0] = "178 251";
|
||||
StartupGui.logoExtent[0] = "443 139";
|
||||
|
||||
// Call the next() function to set our firt
|
||||
// splash screen
|
||||
StartupGui.next();
|
||||
|
||||
StartupGui.setFirstResponder();
|
||||
|
||||
// Play our startup sound
|
||||
//SFXPlayOnce(AudioGui, "data/ui/sounds/startup");//SFXPlay(startsnd);
|
||||
}
|
||||
|
||||
function StartupGui::onWake(%this)
|
||||
{
|
||||
$enableDirectInput = "1";
|
||||
activateDirectInput();
|
||||
}
|
||||
|
||||
function StartupGui::click(%this)
|
||||
{
|
||||
%this.done = true;
|
||||
%this.onDone();
|
||||
}
|
||||
|
||||
function StartupGui::next(%this)
|
||||
{
|
||||
// Set us to a blank screen while we load the next one
|
||||
Canvas.setContent(BlankGui);
|
||||
|
||||
// Set our bitmap and reset the done variable
|
||||
%this.setBitmap(%this.bitmap[$StartupIdx]);
|
||||
%this.done = false;
|
||||
|
||||
// If we have a logo then set it
|
||||
if (isObject(%this->StartupLogo))
|
||||
{
|
||||
if (%this.logo[$StartupIdx] !$= "")
|
||||
{
|
||||
%this->StartupLogo.setBitmap(%this.logo[$StartupIdx]);
|
||||
|
||||
if (%this.logoPos[$StartupIdx] !$= "")
|
||||
{
|
||||
%logoPosX = getWord(%this.logoPos[$StartupIdx], 0);
|
||||
%logoPosY = getWord(%this.logoPos[$StartupIdx], 1);
|
||||
|
||||
%this->StartupLogo.setPosition(%logoPosX, %logoPosY);
|
||||
}
|
||||
|
||||
if (%this.logoExtent[$StartupIdx] !$= "")
|
||||
%this->StartupLogo.setExtent(%this.logoExtent[$StartupIdx]);
|
||||
|
||||
%this->StartupLogo.setVisible(true);
|
||||
}
|
||||
else
|
||||
%this->StartupLogo.setVisible(false);
|
||||
}
|
||||
|
||||
// If we have a secondary logo then set it
|
||||
if (isObject(%this->StartupLogoSecondary))
|
||||
{
|
||||
if (%this.seclogo[$StartupIdx] !$= "")
|
||||
{
|
||||
%this->StartupLogoSecondary.setBitmap(%this.seclogo[$StartupIdx]);
|
||||
|
||||
if (%this.seclogoPos[$StartupIdx] !$= "")
|
||||
{
|
||||
%logoPosX = getWord(%this.seclogoPos[$StartupIdx], 0);
|
||||
%logoPosY = getWord(%this.seclogoPos[$StartupIdx], 1);
|
||||
|
||||
%this->StartupLogoSecondary.setPosition(%logoPosX, %logoPosY);
|
||||
}
|
||||
|
||||
if (%this.seclogoExtent[$StartupIdx] !$= "")
|
||||
%this->StartupLogoSecondary.setExtent(%this.seclogoExtent[$StartupIdx]);
|
||||
|
||||
%this->StartupLogoSecondary.setVisible(true);
|
||||
}
|
||||
else
|
||||
%this->StartupLogoSecondary.setVisible(false);
|
||||
}
|
||||
|
||||
// Increment our screen index for the next screen
|
||||
$StartupIdx++;
|
||||
|
||||
// Set the Canvas to our newly updated GuiFadeinBitmapCtrl
|
||||
Canvas.setContent(%this);
|
||||
}
|
||||
|
||||
function StartupGui::onDone(%this)
|
||||
{
|
||||
// If we have been tagged as done decide if we need
|
||||
// to end or cycle to the next one
|
||||
if (%this.done)
|
||||
{
|
||||
// See if we have a valid bitmap for the next screen
|
||||
if (%this.bitmap[$StartupIdx] $= "")
|
||||
{
|
||||
// Clear our data and load the main menu
|
||||
%this.done = true;
|
||||
|
||||
// NOTE: Don't ever ever delete yourself during a callback from C++.
|
||||
//
|
||||
// Deleting the whole gui itself seems a bit excessive, what if we want
|
||||
// to return to the startup gui at a later time? Any bitmaps set on
|
||||
// the controls should be unloaded automatically if the control is not
|
||||
// awake, if this is not the case then that's what needs to be fixed.
|
||||
|
||||
//%this.delete();
|
||||
//BlankGui.delete();
|
||||
//flushTextureCache();
|
||||
|
||||
%mainMenuGUI = ProjectSettings.value("UI/mainMenuName");
|
||||
if (isObject( %mainMenuGUI ))
|
||||
Canvas.setContent( %mainMenuGUI );
|
||||
}
|
||||
else
|
||||
{
|
||||
// We do have a bitmap so cycle to it
|
||||
%this.next();
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
Templates/BaseGame/game/data/UI/images/BackgroundImage.png
Normal file
|
After Width: | Height: | Size: 659 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="BackgroundImage_image"
|
||||
imageFile="@assetFile=BackgroundImage.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 7.6 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Controller_Disconnected_image"
|
||||
imageFile="@assetFile=Controller_Disconnected.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_0_image"
|
||||
imageFile="@assetFile=Keyboard_Black_0.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_10_image"
|
||||
imageFile="@assetFile=Keyboard_Black_10.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_11_image"
|
||||
imageFile="@assetFile=Keyboard_Black_11.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_12_image"
|
||||
imageFile="@assetFile=Keyboard_Black_12.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_1_image"
|
||||
imageFile="@assetFile=Keyboard_Black_1.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_2_image"
|
||||
imageFile="@assetFile=Keyboard_Black_2.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_3_image"
|
||||
imageFile="@assetFile=Keyboard_Black_3.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_4_image"
|
||||
imageFile="@assetFile=Keyboard_Black_4.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_5_image"
|
||||
imageFile="@assetFile=Keyboard_Black_5.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_6_image"
|
||||
imageFile="@assetFile=Keyboard_Black_6.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_7_image"
|
||||
imageFile="@assetFile=Keyboard_Black_7.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_8_image"
|
||||
imageFile="@assetFile=Keyboard_Black_8.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_9_image"
|
||||
imageFile="@assetFile=Keyboard_Black_9.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_A_image"
|
||||
imageFile="@assetFile=Keyboard_Black_A.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Alt_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Alt.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Arrow_Down_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Arrow_Down.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Arrow_Left_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Arrow_Left.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.5 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Arrow_Right_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Arrow_Right.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Arrow_Up_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Arrow_Up.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Asterisk_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Asterisk.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_B_image"
|
||||
imageFile="@assetFile=Keyboard_Black_B.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Backspace_Alt_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Backspace_Alt.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Backspace_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Backspace.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Blank_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Blank.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.2 KiB |
|
|
@ -0,0 +1,8 @@
|
|||
<ImageAsset
|
||||
canSave="true"
|
||||
canSaveDynamicFields="true"
|
||||
AssetName="Keyboard_Black_Bracket_Left_image"
|
||||
imageFile="@assetFile=Keyboard_Black_Bracket_Left.png"
|
||||
UseMips="true"
|
||||
isHDRImage="false"
|
||||
imageType="Albedo" />
|
||||
|
After Width: | Height: | Size: 1.2 KiB |