Merge pull request #730 from Areloch/BaseUIModuleStandardizePR

Base UI module standardize pr
This commit is contained in:
Brian Roberts 2022-02-23 10:45:00 -06:00 committed by GitHub
commit 10c3188171
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
140 changed files with 2938 additions and 2505 deletions

View file

@ -186,7 +186,7 @@ void VEditorButton::onRender( Point2I offset, const RectI& updateRect )
{
RectI boundsRect( offset, getExtent() );
if ( mDepressed || mStateOn || mMouseOver )
if ( mDepressed || mStateOn || mHighlighted )
{
renderFilledBorder( boundsRect, mProfile->mBorderColorHL, mProfile->mFillColorHL );
}

View file

@ -221,7 +221,7 @@ void afxSpellButton::onRender(Point2I offset, const RectI& updateRect)
if (mActive)
{
if (mMouseOver) state = HILIGHT;
if (mHighlighted) state = HILIGHT;
if (mDepressed || mStateOn) state = DEPRESSED;
}
else

View file

@ -138,7 +138,7 @@ class GuiBitmapButtonCtrl : public GuiButtonCtrl
if( mActive )
{
if( mDepressed || mStateOn ) return DEPRESSED;
if( mMouseOver ) return HILIGHT;
if( mHighlighted ) return HILIGHT;
return NORMAL;
}
else

View file

@ -79,7 +79,7 @@ void GuiBorderButtonCtrl::onRender(Point2I offset, const RectI &updateRect)
}
}
if ( mMouseOver )
if ( mHighlighted )
{
RectI bounds( offset, getExtent() );
for ( S32 i=0; i < mProfile->mBorderThickness; i++ )

View file

@ -98,7 +98,7 @@ EndImplementEnumType;
GuiButtonBaseCtrl::GuiButtonBaseCtrl()
{
mDepressed = false;
mMouseOver = false;
mHighlighted = false;
mActive = true;
static StringTableEntry sButton = StringTable->insert( "Button" );
mButtonText = sButton;
@ -288,14 +288,14 @@ void GuiButtonBaseCtrl::onMouseEnter(const GuiEvent &event)
if(isMouseLocked())
{
mDepressed = true;
mMouseOver = true;
mHighlighted = true;
}
else
{
if ( mActive && mProfile->mSoundButtonOver )
SFX->playOnce(mProfile->mSoundButtonOver);
mMouseOver = true;
mHighlighted = true;
}
}
@ -309,7 +309,7 @@ void GuiButtonBaseCtrl::onMouseLeave(const GuiEvent &)
onMouseLeave_callback();
if( isMouseLocked() )
mDepressed = false;
mMouseOver = false;
mHighlighted = false;
}
//-----------------------------------------------------------------------------
@ -542,3 +542,17 @@ DefineEngineMethod( GuiButtonBaseCtrl, resetState, void, (),,
{
object->resetState();
}
DefineEngineMethod(GuiButtonBaseCtrl, setHighlighted, void, (bool highlighted), (false),
"Reset the mousing state of the button.\n\n"
"This method should not generally be called.")
{
object->setHighlighted(highlighted);
}
DefineEngineMethod(GuiButtonBaseCtrl, isHighlighted, bool, (),,
"Reset the mousing state of the button.\n\n"
"This method should not generally be called.")
{
return object->isHighlighted();
}

View file

@ -49,7 +49,7 @@ class GuiButtonBaseCtrl : public GuiControl
StringTableEntry mButtonText;
StringTableEntry mButtonTextID;
bool mDepressed;
bool mMouseOver;
bool mHighlighted;
bool mStateOn;
S32 mButtonType;
S32 mRadioGroup;
@ -95,7 +95,10 @@ class GuiButtonBaseCtrl : public GuiControl
bool getStateOn() const { return mStateOn; }
void setDepressed( bool depressed ) { mDepressed = depressed; }
void resetState() {mDepressed = false; mMouseOver = false;}
void resetState() {mDepressed = false; mHighlighted = false;}
void setHighlighted(bool highlighted) { mHighlighted = highlighted; }
bool isHighlighted() { return mHighlighted; }
void acceleratorKeyPress(U32 index);
void acceleratorKeyRelease(U32 index);

View file

@ -83,7 +83,7 @@ bool GuiButtonCtrl::onWake()
void GuiButtonCtrl::onRender(Point2I offset,
const RectI& updateRect)
{
bool highlight = mMouseOver;
bool highlight = mHighlighted;
bool depressed = mDepressed;
ColorI fontColor = mActive ? ( highlight ? mProfile->mFontColorHL : mProfile->mFontColor ) : mProfile->mFontColorNA;
@ -107,7 +107,7 @@ void GuiButtonCtrl::onRender(Point2I offset,
indexMultiplier = 4;
else if ( mDepressed || mStateOn )
indexMultiplier = 2;
else if ( mMouseOver )
else if ( mHighlighted )
indexMultiplier = 3;
renderSizableBitmapBordersFilled( boundsRect, indexMultiplier, mProfile );
@ -123,3 +123,4 @@ void GuiButtonCtrl::onRender(Point2I offset,
//render the children
renderChildControls( offset, updateRect);
}

View file

@ -106,7 +106,7 @@ void GuiCheckBoxCtrl::onRender(Point2I offset, const RectI &updateRect)
}
ColorI backColor = mActive ? mProfile->mFillColor : mProfile->mFillColorNA;
ColorI fontColor = mActive ? (mMouseOver ? mProfile->mFontColorHL : mProfile->mFontColor) : mProfile->mFontColorNA;
ColorI fontColor = mActive ? (mHighlighted ? mProfile->mFontColorHL : mProfile->mFontColor) : mProfile->mFontColorNA;
ColorI insideBorderColor = isFirstResponder() ? mProfile->mBorderColorHL : mProfile->mBorderColor;
// just draw the check box and the text:

View file

@ -218,7 +218,7 @@ void GuiIconButtonCtrl::onRender(Point2I offset, const RectI& updateRect)
void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
{
bool highlight = mMouseOver;
bool highlight = mHighlighted;
bool depressed = mDepressed;
ColorI fontColor = mActive ? (highlight ? mProfile->mFontColorHL : mProfile->mFontColor) : mProfile->mFontColorNA;
@ -236,7 +236,7 @@ void GuiIconButtonCtrl::renderButton( Point2I &offset, const RectI& updateRect )
else
renderSlightlyLoweredBox(boundsRect, mProfile);
}
else if(mMouseOver && mActive)
else if(mHighlighted && mActive)
{
// If there is a bitmap array then render using it.
// Otherwise use a standard fill.

View file

@ -90,7 +90,7 @@ bool GuiSwatchButtonCtrl::onWake()
void GuiSwatchButtonCtrl::onRender( Point2I offset, const RectI &updateRect )
{
bool highlight = mMouseOver;
bool highlight = mHighlighted;
ColorI borderColor = mActive ? ( highlight ? mProfile->mBorderColorHL : mProfile->mBorderColor ) : mProfile->mBorderColorNA;

View file

@ -66,7 +66,7 @@ void GuiToggleButtonCtrl::onPreRender()
void GuiToggleButtonCtrl::onRender(Point2I offset,
const RectI& updateRect)
{
bool highlight = mMouseOver;
bool highlight = mHighlighted;
bool depressed = mDepressed;
ColorI fontColor = mActive ? ( highlight ? mProfile->mFontColorHL : mProfile->mFontColor ) : mProfile->mFontColorNA;
@ -89,7 +89,7 @@ void GuiToggleButtonCtrl::onRender(Point2I offset,
indexMultiplier = 4;
else if ( mDepressed || mStateOn )
indexMultiplier = 2;
else if ( mMouseOver )
else if ( mHighlighted )
indexMultiplier = 3;

View file

@ -144,7 +144,7 @@ void GuiToolboxButtonCtrl::onRender(Point2I offset, const RectI& updateRect)
RectI r(offset, getExtent());
if ( mDepressed || mStateOn )
renderStateRect( mLoweredBitmap , r );
else if ( mMouseOver )
else if ( mHighlighted )
renderStateRect( mHoverBitmap , r );
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,313 @@
//-----------------------------------------------------------------------------
// 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.
//-----------------------------------------------------------------------------
#ifndef _GuiGameSettingsCtrl_H_
#define _GuiGameSettingsCtrl_H_
#include "gui/buttons/guiButtonCtrl.h"
#include "T3D/assets/ImageAsset.h"
/// \class GuiGameSettingsCtrl
/// A base class for cross platform menu controls that are gamepad friendly.
class GuiGameSettingsCtrl : public GuiButtonCtrl
{
public:
typedef GuiButtonCtrl Parent;
enum Mode
{
Default = 0,
OptionList,
Slider,
Keybind,
Text
};
protected:
/// \struct OptionEntry
/// Display text and ID key for each entry in an option.
struct OptionEntry
{
StringTableEntry mDisplayText; ///< The text that is displayed for the option
StringTableEntry mKeyString; ///< Key value that is associated with this option
OptionEntry() : mDisplayText(StringTable->EmptyString()), mKeyString(StringTable->EmptyString()) {}
virtual ~OptionEntry() {}
};
StringTableEntry mLabel; ///< Text to display in the control as a label
StringTableEntry mScriptCallback; ///< Script callback when control is activated
StringTableEntry mTooltip; ///< A descriptive tooltip message for what the control is
Mode mMode;
//List options
Vector<OptionEntry> mOptions; ///< Collection of options available to display
S32 mSelectedOption; ///< Index into mOptions pointing at the selected option
bool mWrapOptions; ///< Determines if options should "wrap around" at the ends
//Slider option
F32 mValue; ///< When working as a slider, this contains the value
F32 mStepSize; ///< When working as a slider, this is the increment levels in the range
Point2F mRange; ///< When working as a slider, this sets our min/max range
//Keybind option
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, KeybindBitmap, changeBitmap, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiGameSettingsCtrl, KeybindBitmap);
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, PreviousBitmap, changeBitmap, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiGameSettingsCtrl, PreviousBitmap);
DECLARE_IMAGEASSET(GuiGameSettingsCtrl, NextBitmap, changeBitmap, GFXDefaultGUIProfile);
DECLARE_ASSET_SETGET(GuiGameSettingsCtrl, NextBitmap);
S32 mArrowSize;
S32 mColumnSplit; //Padding between the leftmost edge of the control, and the left side of the 'option'.
S32 mRightPad;
bool mEnabled;
bool mSelected;
public:
void changeBitmap() {}
/// Sets the control as selected . Only controls that are enabled can be selected.
virtual void setSelected();
/// Determines if the specified control is enabled or disabled.
///
/// \return True if the specified control is enabled. False if the control is not
/// enabled
virtual bool isEnabled() const;
/// Sets a control's enabled status according to the given parameters.
///
/// \param enabled Indicate true to enable the control or false to disable it.
virtual void setEnabled(bool enabled);
/// Gets the label displayed on the control.
///
/// \return The label for the control.
virtual StringTableEntry getLabel() const;
/// Sets the label on the control.
///
/// \param label Text to set as the label.
virtual void setLabel(const char * label);
/// Sets the control to a List setting.
///
/// \param label The text to display on the control as a label.
/// \param optionsList A tab separated list of options for the control.
/// \param wrapOptions Specify true to allow options to wrap at the ends or
/// false to prevent wrapping.
/// \param callback [optional] Name of a script function to use as a callback
/// when this control is activated. Default NULL means no callback.
/// \param enabled [optional] If this control is initially enabled. Default true.
void setListSetting(const char* label, const char* optionsList, bool wrapOptions, const char* callback,bool enabled, const char* tooltip = "", const char* defaultValue = "");
/// Sets the control to a Slider setting
///
/// \param label The text to display on the control as a label.
/// \param defaultValue A float indicating the slider's default value
/// \param increments A float indicating the incremental values the slider snaps along between it's range
/// \param range A Point2F that indicates the minimum and maximum value range
/// \param callback [optional] Name of a script function to use as a callback
/// when this control is activated. Default NULL means no callback.
/// \param enabled [optional] If this control is initially enabled. Default true.
void setSliderSetting(const char* label, F32 defaultValue, F32 increments, Point2F range, const char* callback, bool enabled, const char* tooltip = "");
/// Sets the control to a Keybind setting
///
/// \param label The text to display on the control as a label.
/// \param bitmapAssetId The assetId for the button display image
/// \param range A Point2F that indicates the minimum and maximum value range
/// \param callback [optional] Name of a script function to use as a callback
/// when this control is activated. Default NULL means no callback.
/// \param enabled [optional] If this control is initially enabled. Default true.
void setKeybindSetting(const char* label, const char* bitmapAssetId, const char* callback, bool enabled, const char* tooltip);
/// Gets the text for the currently selected option of the control.
///
/// \return A string representing the text currently displayed as the selected
/// option on the control. If there is no such displayed text then the empty
/// string is returned.
StringTableEntry getCurrentOption() const;
/// Gets the key string for the currently selected option of the control
///
/// \return The key (or id) that was assigned to the selected option on the
/// control. If there is no selected option then the empty string is returned.
StringTableEntry getCurrentOptionKey() const;
/// Gets the index into the option list for the currently selected option of the control.
///
/// \return The index of the selected option on the control. If there is no
/// selected option then -1 is returned.
S32 getCurrentOptionIndex() const;
/// Attempts to set the control to the specified selected option. The option
/// will only be set if the option exists in the control.
///
/// \param option The option to be made active.
/// \return True if the control contained the option and was set, false otherwise.
bool selectOption(const char* option);
/// Attempts to set the control to the option with the specified key. The
/// option will only be set if the key exists in the control.
///
/// \param optionKey The key string that was assigned to the option to be made active.
/// \return True if the control contained the key and the option and was set, false otherwise.
bool selectOptionByKey(const char* optionKey);
/// Attempts to set the control to the option at the specified index. The option
/// will only be set if the index is valid.
///
/// \param optionIndex The index of the option to be made active.
/// \return True if the index was valid and the option and was set, false otherwise.
bool selectOptionByIndex(S32 optionIndex);
/// Sets the list of options on the control.
///
/// \param optionsList A tab separated list of options for the control.
void setOptions(const char* optionsList);
/// Adds an option to the list of options on the control.
///
/// \param displayText The text to display for this option.
/// \param keyText The id string to associate with this value. If NULL the
/// id will be the same as the display text.
void addOption(const char* displayText, const char* keyText);
/// Activates the control. The script callback of the control will
/// be called (if it has one).
virtual void activate();
/// Gets the value
///
F32 getValue();
/// Sets the value
///
/// \param value The new value to be set.
void setValue(F32 value);
Mode getMode() { return mMode; }
/// Gets the tooltip
const char* getTooltip();
GuiGameSettingsCtrl();
~GuiGameSettingsCtrl();
void onRender(Point2I offset, const RectI &updateRect);
void onRenderListOption(Point2I currentOffset);
void onRenderSliderOption(Point2I currentOffset);
void onRenderKeybindOption(Point2I currentOffset);
/// Callback when the object is registered with the sim.
///
/// \return True if the profile was successfully added, false otherwise.
bool onAdd();
/// Callback when the control wakes up.
bool onWake();
void clear();
virtual void onMouseMove(const GuiEvent& event);
virtual void onMouseUp(const GuiEvent& event);
DECLARE_CONOBJECT(GuiGameSettingsCtrl);
DECLARE_CATEGORY( "Gui Game" );
DECLARE_DESCRIPTION( "Base class for cross platform menu controls that are gamepad friendly." );
/// Initializes fields accessible through the console.
static void initPersistFields();
static const S32 NO_OPTION = -1; ///< Indicates there is no option
protected:
/// Sets up the option
///
/// \param label The text to display on the control as a label.
/// \param callback Name of a script function to use as a callback when this
/// control is activated.
/// \param enabled [optional] If this control is initially enabled. Default true.
virtual void set(const char* label, const char* callback, bool useHighlightIcon = true, bool enabled = true, S32 mode = 0, const char* tooltip = "");
/// Sets the script variable $ThisControl to reflect this control.
virtual void setThisControl();
/// @name Callbacks
/// @{
DECLARE_CALLBACK( void, onChange, () );
DECLARE_CALLBACK(void, onInputEvent, (const char* device, const char* action, bool state));
DECLARE_CALLBACK(void, onAxisEvent, (const char* device, const char* action, F32 axisValue));
/// @}
/// Evaluates some script. If the command is empty then nothing is evaluated.
///
/// \param command The script to evaluate.
void doScriptCommand(StringTableEntry command);
StringTableEntry mCallbackOnA; ///< Script callback when the 'A' button is pressed
StringTableEntry mCallbackOnB; ///< Script callback when the 'B' button is pressed
StringTableEntry mCallbackOnX; ///< Script callback when the 'X' button is pressed
StringTableEntry mCallbackOnY; ///< Script callback when the 'Y' button is pressed
private:
/// Performs a click on the current option. The x position is used to
/// determine if the left or right arrow were clicked. If one was clicked, the
/// option will be changed. If neither was clicked, the option is unaffected.
/// This method should only be called when there is an actively selected control.
///
/// \param xPos The x position of the the click, relative to the control.
void clickOption(S32 xPos);
/// Changes the option on the currently selected control.
///
/// \param delta The amount to change the option selection by. Typically this
/// will be 1 or -1.
void changeOption(S32 delta);
/// Performs a click on the current slider control. The x position is used to
/// determine if the left or right arrow were clicked, or if it landed somewhere on the sliderbar.
/// If one was clicked, the option will be changed. If neither was clicked, the option is unaffected.
/// This method should only be called when there is an actively selected control.
///
/// \param xPos The x position of the the click, relative to the control.
void clickSlider(S32 xPos);
void clickKeybind(S32 xPos);
private:
bool mCallbackOnInputs;
bool mConsumeKeyInputEvents;
};
#endif

View file

@ -99,7 +99,7 @@ bool GuiGradientSwatchCtrl::onWake()
void GuiGradientSwatchCtrl::onRender( Point2I offset, const RectI &updateRect )
{
bool highlight = mMouseOver;
bool highlight = mHighlighted;
ColorI borderColor = mActive ? ( highlight ? mProfile->mBorderColorHL : mProfile->mBorderColor ) : mProfile->mBorderColorNA;
RectI renderRect( offset, getExtent() );
@ -632,4 +632,4 @@ DefineEngineMethod(GuiGradientCtrl, getColor, LinearColorF, (S32 idx), , "Get co
}
return LinearColorF::ONE;
}
}

View file

@ -706,6 +706,9 @@ bool GuiCanvas::processInputEvent(InputEventInfo &inputEvent)
if (mCursorEnabled || mForceMouseToGUI ||
(mAlwaysHandleMouseButtons && inputEvent.objType == SI_BUTTON) )
{
if (inputEvent.objType != SI_AXIS && inputEvent.action == SI_MAKE)
bool asdfasdf = true;
return processMouseEvent(inputEvent);
}
break;

View file

@ -61,7 +61,8 @@ ConsoleDocClass( GuiInputCtrl,
GuiInputCtrl::GuiInputCtrl()
: mSendAxisEvents(false),
mSendBreakEvents(false),
mSendModifierEvents(false)
mSendModifierEvents(false),
mIgnoreMouseEvents(false)
{
}
@ -76,6 +77,8 @@ void GuiInputCtrl::initPersistFields()
"If true, break events for all devices will generate callbacks (Default false).");
addField("sendModifierEvents", TypeBool, Offset(mSendModifierEvents, GuiInputCtrl),
"If true, Make events will be sent for modifier keys (Default false).");
addField("ignoreMouseEvents", TypeBool, Offset(mIgnoreMouseEvents, GuiInputCtrl),
"If true, any events from mouse devices will be passed through.");
endGroup("GuiInputCtrl");
Parent::initPersistFields();
@ -97,7 +100,7 @@ bool GuiInputCtrl::onWake()
if ( !Parent::onWake() )
return( false );
if( !smDesignTime )
if( !smDesignTime && !mIgnoreMouseEvents)
mouseLock();
setFirstResponder();
@ -151,6 +154,9 @@ IMPLEMENT_CALLBACK(GuiInputCtrl, onAxisEvent, void, (const char* device, const c
//------------------------------------------------------------------------------
bool GuiInputCtrl::onInputEvent( const InputEventInfo &event )
{
if (mIgnoreMouseEvents && event.deviceType == MouseDeviceType)
return false;
char deviceString[32];
if ( event.action == SI_MAKE )
{

View file

@ -36,6 +36,7 @@ protected:
bool mSendAxisEvents;
bool mSendBreakEvents;
bool mSendModifierEvents;
bool mIgnoreMouseEvents;
public:

View file

@ -26,6 +26,10 @@ if($Gui::fontCacheDirectory $= "")
$Gui::fontCacheDirectory = expandFilename("data/cache/fonts");
}
$TextMediumEmphasisColor = "200 200 200";
$TextHighEmphasisColor = "224 224 224";
$TextDisabledColor = "108 108 108";
// ----------------------------------------------------------------------------
// GuiDefaultProfile is a special profile that all other profiles inherit
// defaults from. It must exist.
@ -137,13 +141,20 @@ new GuiControlProfile(GuiTextEditProfile)
category = "Core";
};
if(!isObject(GuiScrollProfile))
new GuiControlProfile(GuiScrollProfile)
if(!isObject(GuiMenuScrollProfile))
new GuiControlProfile(GuiMenuScrollProfile)
{
opaque = true;
fillcolor = "255 255 255";
fontColor = "0 0 0";
fontColorHL = "150 150 150";
fontColor = $TextMediumEmphasisColor;
fontColorHL = $TextMediumEmphasisColor;
fontColorNA = $TextDisabledColor;
fontColorSEL = $TextMediumEmphasisColor;
fillColor = "40 40 40";
fillColorHL = "56 56 56";
fillColorNA = "40 40 40";
borderColor = "87 87 87";
borderColorNA = "0 0 0";
borderColorHL = "255 255 255";
border = true;
bitmapAsset = "Core_GUI:scrollBar_image";
hasBitmapArray = true;

View file

@ -81,6 +81,7 @@ function ExampleModule::initClient(%this)
exec(%prefPath @ "/keybinds." @ $TorqueScriptFileExtension);
%this.queueExec("./scripts/inputCommands");
addOptionsMenuCategory("Example Options", "testExampleOptions();");
}
//This is called when a game session client successfuly connects to a game server.
@ -105,4 +106,9 @@ function ExampleModule::onDestroyClientConnection(%this)
{
//This will pop the keybind, cleaning it up from the input stack, as it no longer applies
ExampleMoveMap.pop();
}
function testExampleOptions()
{
addListOption("Test Option", "This is a test option", $testOptionValue, "OptionA\tOptionB");
}

View file

@ -11,4 +11,4 @@
canSaveDynamicFields="true"
Extension="asset.taml"
Recurse="true" />
</ModuleDefinition>
</ModuleDefinition>

View file

@ -36,7 +36,7 @@ function UI::initClient(%this)
%this.queueExec("./scripts/profiles");
//Now gui files
%this.queueExec("./scripts/menuInputButtons");
%this.queueExec("./scripts/menuInputHandling");
%this.queueExec("./guis/mainMenu");
%this.queueExec("./guis/mainMenu.gui");
@ -83,4 +83,4 @@ function UI::initClient(%this)
function UI::onCreateClientConnection(%this){}
function UI::onDestroyClientConnection(%this){}
function UI::onDestroyClientConnection(%this){}

View file

@ -2,5 +2,5 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="guiSounds"
scriptFile="@assetFile=guiSounds.cs"
scriptFile="@assetFile=guiSounds"
VersionId="1" />

View file

@ -31,4 +31,4 @@ singleton SFXProfile(menuButtonHover)
preload = true;
description = AudioGui;
fileName = "data/ui/sounds/buttonHover";
};
};

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ChooseLevelDlg"
scriptFile="@assetFile=chooseLevelDlg.gui"
scriptFile="@assetFile=chooseLevelDlg"
GUIFile="@assetFile=chooseLevelDlg.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="GuiMusicPlayer"
scriptFile="@assetFile=guiMusicPlayer.gui"
scriptFile="@assetFile=guiMusicPlayer"
GUIFile="@assetFile=guiMusicPlayer.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="IODropdownDlg"
scriptFile="@assetFile=IODropdownDlg.ed.gui"
GUIFile="@assetFile=IODropdownDlg.ed.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="JoinServerMenu"
scriptFile="@assetFile=joinServerMenu.gui"
scriptFile="@assetFile=joinServerMenu"
GUIFile="@assetFile=joinServerMenu.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="LoadingGui"
scriptFile="@assetFile=loadingGui.gui"
GUIFile="@assetFile=loadingGui.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="MainMenuGui"
scriptFile="@assetFile=mainMenu.gui"
scriptFile="@assetFile=mainMenu"
GUIFile="@assetFile=mainMenu.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="MessageBoxDlg"
scriptFile="@assetFile=messageBoxDlg.gui"
GUIFile="@assetFile=messageBoxDlg.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -0,0 +1,4 @@
<GUIAsset
AssetName="NetGraphGui"
GUIFile="@assetFile=netGraphGui.gui"
VersionId="1"/>

View file

@ -1,7 +0,0 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="NetGraphProfile"
scriptFile="@assetFile=netGraphGui.gui"
GUIFile="@assetFile=netGraphGui.gui"
VersionId="1" />

View file

@ -1,7 +0,0 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="OptionsDlg"
scriptFile="@assetFile=optionsDlg.gui"
GUIFile="@assetFile=optionsDlg.gui"
VersionId="1" />

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="OptionsMenu"
scriptFile="@assetFile=optionsMenu.gui"
scriptFile="@assetFile=optionsMenu"
GUIFile="@assetFile=optionsMenu.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="PauseMenu"
scriptFile="@assetFile=pauseMenu.gui"
scriptFile="@assetFile=pauseMenu"
GUIFile="@assetFile=pauseMenu.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="ProfilerGui"
scriptFile="@assetFile=profiler.gui"
scriptFile="@assetFile=profiler"
GUIFile="@assetFile=profiler.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="RemapConfirmDlg"
scriptFile="@assetFile=remapConfirmDlg.gui"
GUIFile="@assetFile=remapConfirmDlg.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="RemapDlg"
scriptFile="@assetFile=remapDlg.gui"
GUIFile="@assetFile=remapDlg.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -1,7 +1,5 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="StartupGui"
scriptFile="@assetFile=startupGui.gui"
scriptFile="@assetFile=startupGui"
GUIFile="@assetFile=startupGui.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -36,7 +36,7 @@ $guiContent = new GuiControl(ChooseLevelDlg) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel.png";
bitmapAsset = "UI:panel_image";
color = "255 255 255 255";
position = "0 0";
extent = "927 40";
@ -79,7 +79,7 @@ $guiContent = new GuiControl(ChooseLevelDlg) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel_low.png";
bitmapAsset = "UI:panel_low_image";
color = "255 255 255 255";
position = "0 40";
extent = "927 618";

View file

@ -1,102 +0,0 @@
<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>

View file

@ -14,19 +14,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
canSave = "1";
canSaveDynamicFields = "1";
returnGui = "MainMenuGui";
new GuiInputCtrl(JoinServerMenuInputHandler){
profile = "GuiInputCtrlProfile";
visible = "1";
active = "1";
position = "0 0";
extent = "1024 768";
new GuiInputCtrl(JoinServerMenuInputHandler) {
sendAxisEvents = "1";
sendBreakEvents = "1";
sendModifierEvents = "0";
ignoreMouseEvents = "1";
lockMouse = "0";
position = "-10 0";
extent = "10 10";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
sendBreakEvents="1";
profile = "GuiInputCtrlProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiControl(JoinServerWindow) {
position = "48 56";
extent = "928 655";
@ -46,7 +54,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel.png";
BitmapAsset = "UI:panel_image";
color = "255 255 255 255";
position = "0 0";
extent = "927 40";
@ -89,7 +97,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel_low.png";
BitmapAsset = "UI:panel_low_image";
color = "255 255 255 255";
position = "0 40";
extent = "927 618";
@ -105,58 +113,6 @@ $guiContent = new GuiControl(JoinServerMenu) {
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";
@ -166,7 +122,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "277 47";
position = "392 47";
extent = "148 18";
minExtent = "8 8";
horizSizing = "right";
@ -324,25 +280,30 @@ $guiContent = new GuiControl(JoinServerMenu) {
canSave = "1";
canSaveDynamicFields = "0";
new GuiTextListCtrl(JS_serverList) {
columns = "0 200 270 335 400";
fitParentWidth = "1";
clipColumnText = "0";
rowHeightPadding = "2";
new GuiStackControl(JoinServerList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "10";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "0";
changeChildPosition = "1";
position = "1 1";
extent = "888 8";
minExtent = "8 8";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiTextArrayProfile";
extent = "888 16";
minExtent = "16 16";
horizSizing = "center";
vertSizing = "center";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
altCommand = "JoinServerDlg.join();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
class = "MenuList";
};
};
new GuiControl(JS_queryStatus) {
@ -427,130 +388,9 @@ $guiContent = new GuiControl(JoinServerMenu) {
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";
position = "116 711";
extent = "791 40";
minExtent = "8 2";
horizSizing = "center";
@ -567,7 +407,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
BitmapAsset = "UI:Keyboard_Black_Return_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -585,8 +425,8 @@ $guiContent = new GuiControl(JoinServerMenu) {
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "OptionsMenu.apply();";
active = "0";
command = "JoinServerMenu.join();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
@ -597,7 +437,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
BitmapAsset = "UI:Keyboard_Black_Escape_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -616,7 +456,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "OptionsMenu.backOut();";
command = "JoinServerMenu.backOut();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
@ -627,14 +467,14 @@ $guiContent = new GuiControl(JoinServerMenu) {
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
BitmapAsset = "UI:Keyboard_Black_Q_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
textMargin = "4";
autoSize = "0";
text = "Prev Tab";
text = "Query LAN";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -644,28 +484,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "0";
active = "0";
command = "OptionsMenu.prevTab();";
visible = "1";
active = "1";
command = "JoinServerMenu.queryLan();";
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";
BitmapAsset = "UI:Keyboard_Black_E_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
textMargin = "4";
autoSize = "0";
text = "Next Tab";
text = "Query Online";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -675,28 +514,27 @@ $guiContent = new GuiControl(JoinServerMenu) {
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "0";
active = "0";
command = "OptionsMenu.nextTab();";
visible = "1";
active = "1";
command = "JoinServerMenu.query();";
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";
BitmapAsset = "UI:Keyboard_Black_R_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
textLocation = "Right";
textMargin = "4";
autoSize = "0";
text = "Reset";
text = "Refresh";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
@ -708,7 +546,7 @@ $guiContent = new GuiControl(JoinServerMenu) {
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "OptionsMenu.resetToDefaults();";
command = "JoinServerMenu.refresh();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";

View file

@ -1,12 +1,10 @@
function JoinServerMenu::onWake()
function JoinServerMenu::onWake(%this)
{
// 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();
JoinServerList.setAsActiveMenuList();
JoinServerMenuInputHandler.setFirstResponder();
}
@ -16,7 +14,7 @@ function JoinServerButtonHolder::onWake(%this)
%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();");
%this-->queryInternetButton.set("btn_x", "E", "Query Online", "JoinServerMenu.query();");
}
function JoinServerMenuInputHandler::onInputEvent(%this, %device, %action, %state)
@ -110,23 +108,23 @@ function JoinServerMenu::update(%this)
{
// Copy the servers into the server list.
JS_queryStatus.setVisible(false);
JS_serverList.clear();
JoinServerList.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
);
%serverBtn = new GuiButtonCtrl(){
text = $ServerInfo::Name TAB
$ServerInfo::Ping TAB
$ServerInfo::PlayerCount @ "/" @ $ServerInfo::MaxPlayers TAB
$ServerInfo::Version TAB
$ServerInfo::MissionName;
profile = GuiJoinServerButtonProfile;
extent = JoinServerList.extent.x SPC 30;
};
JoinServerList.add(%serverBtn);
}
JS_serverList.sort(0);
JS_serverList.setSelectedRow(0);
JS_serverList.scrollVisible(0);
JoinServerJoinBtn.setActive(JS_serverList.rowCount() > 0);
JoinServerButtonHolder-->joinButton.setActive(JoinServerList.getCount() > 0);
}
//----------------------------------------
@ -141,11 +139,9 @@ function onServerQueryStatus(%status, %msg, %value)
switch$ (%status) {
case "start":
JoinServerJoinBtn.setActive(false);
JoinServerQryInternetBtn.setActive(false);
JS_statusText.setText(%msg);
JS_statusBar.setValue(0);
JS_serverList.clear();
JoinServerList.clear();
case "ping":
JS_statusText.setText("Ping Servers");
@ -156,7 +152,6 @@ function onServerQueryStatus(%status, %msg, %value)
JS_statusBar.setValue(%value);
case "done":
JoinServerQryInternetBtn.setActive(true);
JS_queryStatus.setVisible(false);
JS_status.setText(%msg);
JoinServerMenu.update();

View file

@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiChunkedBitmapCtrl(LoadingGui) {
bitmapAsset = "UI:background_dark_image";
bitmapAsset = "UI:backgrounddark_image";
useVariable = "0";
tile = "0";
position = "0 0";

View file

@ -1,6 +1,6 @@
//--- OBJECT WRITE BEGIN ---
$guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
bitmapAsset = "UI:background_dark_image";
BitmapAsset = "UI:backgrounddark_image";
useVariable = "0";
tile = "0";
position = "0 0";
@ -19,15 +19,11 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
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";
BitmapAsset = "UI:Torque_3D_logo_alt_image";
color = "255 255 255 255";
wrap = "0";
position = "550 30";
extent = "443 139";
minExtent = "8 2";
@ -41,26 +37,179 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "1";
autoFitExtents = "0";
bitmapMode = "Stretched";
groupNum = "-1";
masked = "0";
navigationIndex = "-1";
useModifiers = "0";
useStates = "1";
};
new GuiGameListMenuCtrl(MainMenuButtonList) {
debugRender = "0";
callbackOnInputs = "1";
position = "292 103";
extent = "439 561";
minExtent = "8 2";
new GuiStackControl(MainMenuButtonList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "15";
dynamicSize = "0";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "312 111";
extent = "400 477";
minExtent = "16 16";
horizSizing = "center";
vertSizing = "center";
profile = "DefaultListMenuProfile";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
class = "UIMenuButtonList";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
class = "MenuList";
new GuiButtonCtrl(MainMenuSinglePlayerBtn) {
text = "Single Player";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 0";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openSinglePlayerMenu();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuCreateSrvrBtn) {
text = "Create Server";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 70";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openMultiPlayerMenu();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuJoinSrvrBtn) {
text = "Join Server";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 140";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openJoinServerMenu();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuOptionBtn) {
text = "Options";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 210";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openOptionsMenu();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuWorldEditBtn) {
text = "Open World Editor";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 280";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openWorldEditorBtn();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuGuiEditBtn) {
text = "Open GUI Editor";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 350";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "openGUIEditorBtn();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
new GuiButtonCtrl(MainMenuExitBtn) {
text = "Exit";
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 420";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "quit();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiControl(MainMenuButtonHolder) {
position = "189 711";
@ -80,7 +229,7 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
BitmapAsset = "UI:Keyboard_Black_Return_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -109,5 +258,26 @@ $guiContent = new GuiChunkedBitmapCtrl(MainMenuGui) {
canSaveDynamicFields = "0";
};
};
new GuiInputCtrl(MainMenuInputHandler) {
class = "MenuInputHandler";
sendAxisEvents = "1";
sendBreakEvents = "1";
sendModifierEvents = "0";
ignoreMouseEvents = "1";
lockMouse = "0";
position = "-50 0";
extent = "10 10";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiInputCtrlProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
//--- OBJECT WRITE END ---

View file

@ -5,8 +5,9 @@ function MainMenuGui::onAdd(%this)
function MainMenuGui::onWake(%this)
{
MainMenuButtonList.hidden = false;
MainMenuButtonList.setAsActiveMenuList();
MainMenuButtonHolder.setActive();
MainMenuInputHandler.setFirstResponder();
}
function MainMenuGui::onSleep(%this)
@ -16,18 +17,7 @@ function MainMenuGui::onSleep(%this)
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);
%this-->goButton.set("btn_a", "Return", "Go", "MainMenuButtonList.activate();");
}
function openSinglePlayerMenu()
@ -76,4 +66,5 @@ function MainMenuGui::onReturnTo(%this)
MainMenuButtonList.hidden = false;
MainMenuButtonList.setFirstResponder();
MainMenuButtonHolder.setActive();
}
MainMenuButtonList.setAsActiveMenuList();
}

View file

@ -34,7 +34,7 @@ $guiContent = new GuiControl(MessageBoxDlg) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel.png";
bitmapAsset = "UI:panel_image";
color = "255 255 255 255";
position = "0 0";
extent = "641 40";
@ -77,7 +77,7 @@ $guiContent = new GuiControl(MessageBoxDlg) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel_low.png";
bitmapAsset = "UI:panel_low_image";
color = "255 255 255 255";
position = "0 40";
extent = "641 341";

View file

@ -554,4 +554,4 @@ function NetGraph::updateNetworkSimulation(%this)
}
netSimulateLag( %latency, %packetLoss );
}
}

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@ $guiContent = new GuiControl(OptionsMenu) {
position = "48 56";
extent = "928 655";
minExtent = "8 2";
horizSizing = "center";
horizSizing = "aspectCenter";
vertSizing = "center";
profile = "GuiDefaultProfile";
visible = "1";
@ -38,7 +38,27 @@ $guiContent = new GuiControl(OptionsMenu) {
percent = "100";
vertical = "0";
flipClip = "0";
bitmap = "data/ui/images/panel.png";
BitmapAsset = "UI:panel_low_image";
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 GuiBitmapBarCtrl() {
percent = "100";
vertical = "0";
flipClip = "0";
BitmapAsset = "UI:panel_image";
color = "255 255 255 255";
position = "0 0";
extent = "927 40";
@ -77,179 +97,6 @@ $guiContent = new GuiControl(OptionsMenu) {
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";
@ -258,10 +105,10 @@ $guiContent = new GuiControl(OptionsMenu) {
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "635 94";
position = "3 606";
extent = "293 17";
minExtent = "8 2";
horizSizing = "right";
horizSizing = "width";
vertSizing = "bottom";
profile = "MenuSubHeaderText";
visible = "1";
@ -278,10 +125,10 @@ $guiContent = new GuiControl(OptionsMenu) {
maxChars = "-1";
text = "This is a placeholder text for an option.";
useURLMouseCursor = "0";
position = "635 126";
position = "3 625";
extent = "293 14";
minExtent = "8 2";
horizSizing = "right";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiMLTextProfile";
visible = "1";
@ -292,24 +139,165 @@ $guiContent = new GuiControl(OptionsMenu) {
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 GuiSplitContainer() {
orientation = "Vertical";
splitterSize = "2";
splitPoint = "250 100";
fixedPanel = "FirstPanel";
fixedSize = "250";
docking = "None";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 48";
extent = "928 555";
minExtent = "64 64";
horizSizing = "width";
vertSizing = "bottom";
profile = "GuiMenuScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiPanel() {
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "0 0";
extent = "248 555";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiOverlayProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "Panel1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl(OptionsMenuCategoryList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "10";
dynamicSize = "0";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "0 0";
extent = "248 555";
minExtent = "16 16";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "MenuList";
canSave = "1";
canSaveDynamicFields = "0";
};
};
new GuiPanel() {
docking = "Client";
margin = "0 0 0 0";
padding = "0 0 0 0";
anchorTop = "1";
anchorBottom = "0";
anchorLeft = "1";
anchorRight = "0";
position = "252 0";
extent = "676 555";
minExtent = "16 16";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiOverlayProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
internalName = "panel2";
canSave = "1";
canSaveDynamicFields = "0";
new GuiScrollCtrl() {
willFirstRespond = "1";
hScrollBar = "alwaysOff";
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 0";
extent = "676 554";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiMenuScrollProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiStackControl(OptionsMenuSettingsList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "5";
dynamicSize = "1";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "0";
changeChildPosition = "1";
position = "1 1";
extent = "661 30";
minExtent = "16 16";
horizSizing = "width";
vertSizing = "height";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "1";
class = "MenuList";
canSave = "1";
canSaveDynamicFields = "0";
};
};
};
};
};
new GuiControl(OptionsButtonHolder) {
position = "109 711";
position = "116 711";
extent = "791 40";
minExtent = "8 2";
horizSizing = "center";
@ -326,7 +314,7 @@ $guiContent = new GuiControl(OptionsMenu) {
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Enter";
BitmapAsset = "UI:Keyboard_Black_Return_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -345,7 +333,7 @@ $guiContent = new GuiControl(OptionsMenu) {
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "ChooseLevelDlg.beginLevel();";
command = "OptionsMenu.apply();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
@ -356,7 +344,7 @@ $guiContent = new GuiControl(OptionsMenu) {
};
new GuiIconButtonCtrl() {
buttonMargin = "4 4";
iconBitmap = "data/ui/images/Inputs/Keyboard & Mouse/Keyboard_Black_Esc";
BitmapAsset = "UI:Keyboard_Black_Escape_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -375,7 +363,7 @@ $guiContent = new GuiControl(OptionsMenu) {
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "ChooseLevelDlg.backOut();";
command = "OptionsMenu.backOut();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
@ -386,65 +374,7 @@ $guiContent = new GuiControl(OptionsMenu) {
};
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";
BitmapAsset = "UI:Keyboard_Black_R_image";
iconLocation = "Left";
sizeIconToButton = "1";
makeIconSquare = "1";
@ -463,6 +393,7 @@ $guiContent = new GuiControl(OptionsMenu) {
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = "OptionsMenu.resetToDefaults();";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
@ -472,5 +403,26 @@ $guiContent = new GuiControl(OptionsMenu) {
canSaveDynamicFields = "0";
};
};
new GuiInputCtrl(OptionsMenuInputHandler) {
sendAxisEvents = "1";
sendBreakEvents = "1";
sendModifierEvents = "0";
ignoreMouseEvents = "1";
lockMouse = "0";
position = "-50 0";
extent = "10 10";
minExtent = "8 2";
horizSizing = "left";
vertSizing = "top";
profile = "GuiInputCtrlProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
class = "MenuInputHandler";
canSave = "1";
canSaveDynamicFields = "0";
};
};
//--- OBJECT WRITE END ---

View file

@ -46,45 +46,164 @@
//headbob
//FOV
function OptionsMenu::onAdd(%this)
{
if(!isObject(%this.optionsCategories))
{
%this.optionsCategories = new ArrayObject();
}
if(!isObject(%this.unappliedChanges))
{
%this.unappliedChanges = new ArrayObject();
}
addOptionsMenuCategory("Display", "populateDisplaySettingsList();");
addOptionsMenuCategory("Graphics", "populateGraphicsSettingsList();");
addOptionsMenuCategory("Audio", "populateAudioSettingsList();");
addOptionsMenuCategory("Keyboard & Mouse", "populateKeyboardMouseSettingsList();");
addOptionsMenuCategory("Gamepad", "populateGamepadSettingsList();");
}
function OptionsMenuSettingsList::onAdd(%this)
{
}
function OptionsMenuSettingsList::getOptionsList(%this, %index)
{
}
function OptionsMenu::onWake(%this)
{
OptionsMenuCategoryList.clear();
for(%i=0; %i < %this.optionsCategories.count(); %i++)
{
%catName = %this.optionsCategories.getKey(%i);
%callback = %this.optionsCategories.getValue(%i);
%newCatButton = new GuiButtonCtrl() {
text = %catName;
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 180";
extent = "248 35";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = %callback;
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
OptionsMenuCategoryList.add(%newCatButton);
}
%this.unappliedChanges.empty();
MainMenuButtonList.hidden = true;
%this.pageTabIndex = 0;
%tab = %this.getTab();
%tab.performClick();
OptionsMenuCategoryList.setAsActiveMenuList();
OptionsButtonHolder.setActive();
OptionsMenuInputHandler.setFirstResponder();
}
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();");
//OptionsMenuCategoryList.getObject(0).performClick();
}
function OptionsMenu::apply(%this)
{
if(%this.pageTabIndex == 0)
//Now we run through our list of unapplied changes and... apply them.
%hasKeybindChanges = false;
%hasVideoChanges = false;
%hasPostFXChanges = false;
%hasAudioChanges = false;
for(%i=0; %i < %this.unappliedChanges.count(); %i++)
{
%this.applyDisplaySettings();
%targetVar = %this.unappliedChanges.getKey(%i);
%newValue = %this.unappliedChanges.getValue(%i);
//First, lets just check through our action map names, see if any match
%wasKeybind = false;
for(%am=0; %am < ActionMapGroup.getCount(); %am++)
{
%actionMap = ActionMapGroup.getObject(%am);
if(%actionMap == GlobalActionMap.getId())
continue;
%actionMapName = %actionMap.humanReadableName $= "" ? %actionMap.getName() : %actionMap.humanReadableName;
if(%actionMapName $= %targetVar)
{
%hasKeybindChanges = true;
%wasKeybind = true;
break;
}
}
if(!%wasKeybind)
{
%currentValue = getVariable(%targetVar);
if(%currentValue !$= %newValue)
{
setVariable(%targetVar, %newValue);
//now, lets check for special cases that need additional handling
//for updates
if ( %targetVar $= "$pref::Video::displayDevice" )
{
MessageBoxOK( "Change requires restart", "Please restart the game for a display device change to take effect." );
}
else if(startsWith(%targetVar, "$pref::Graphics::"))
{
//isolate the quality group name, like $pref::Graphics::LightingQuality
//we grab LightingQuality
%qualityGroupName = getSubStr(%targetVar, 17);
if(isObject(%qualityGroupName @ "List"))
{
//yep, it's a quality group, so apply it
(%qualityGroupName @ "List").applySetting(%newValue);
}
if(%qualityGroupName $= "TextureQuality")
{
reloadTextures();
}
}
else if(startsWith(%targetVar, "$pref::PostFX::"))
{
%hasPostFXChanges = true;
}
else if(startsWith(%targetVar, "$pref::Video::"))
{
%hasVideoChanges = true;
}
else if(startsWith(%targetVar, "$pref::SFX::"))
{
%hasAudioChanges = true;
}
}
}
}
else if(%this.pageTabIndex == 1)
{
%this.applyGraphicsSettings();
}
else if(%this.pageTabIndex == 2)
{
%this.applyAudioSettings();
}
else if(%this.pageTabIndex == 3 || %this.pageTabIndex == 4)
//If we had keybind changes, go ahead and save those out
if(%hasKeybindChanges)
{
%prefPath = getPrefpath();
@ -106,8 +225,26 @@ function OptionsMenu::apply(%this)
}
}
if(%hasPostFXChanges)
{
updatePostFXSettings();
}
if(%hasVideoChanges)
{
updateDisplaySettings();
}
if(%hasAudioChanges)
{
updateAudioSettings();
}
//Finally, write our prefs to file
%prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
OptionsMenu.unappliedChanges.empty();
}
function OptionsMenu::resetToDefaults(%this)
@ -115,83 +252,12 @@ 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)
//
//
//
function populateDisplaySettingsList()
{
%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();
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
@ -221,7 +287,7 @@ function OptionsMenu::populateDisplaySettingsList(%this)
trim(%apiList);
OptionsMenuSettingsList.addOptionRow("Display API", %apiList, false, "", -1, -30, true, "The display API used for rendering.", %displayDevice);
OptionsMenuSettingsList.addOptionRow("Display API", "$pref::Video::DisplayAPI", %apiList, false, "", true, "The display API used for rendering.", %displayDevice);
%numDevices = Canvas.getMonitorCount();
%devicesList = "";
@ -235,7 +301,7 @@ function OptionsMenu::populateDisplaySettingsList(%this)
}
%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);
OptionsMenuSettingsList.addOptionRow("Display Device", "$pref::Video::deviceId", %devicesList, false, "", true, "The display devices the window should be on.", %selectedDevice);
if (%numDevices > 1)
OptionsMenuSettingsList.setRowEnabled(1, true);
@ -243,10 +309,10 @@ function OptionsMenu::populateDisplaySettingsList(%this)
OptionsMenuSettingsList.setRowEnabled(1, false);
%mode = getField($Video::ModeTags, $pref::Video::deviceMode);
OptionsMenuSettingsList.addOptionRow("Window Mode", $Video::ModeTags, false, "onDisplayModeChange", -1, -30, true, "", %mode);
OptionsMenuSettingsList.addOptionRow("Window Mode", "$pref::Video::deviceMode", $Video::ModeTags, false, "", 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 ));
OptionsMenuSettingsList.addOptionRow("Resolution", "$pref::Video::Resolution", %resolutionList, false, "onDisplayResChange", 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")
@ -254,22 +320,20 @@ function OptionsMenu::populateDisplaySettingsList(%this)
else
OptionsMenuSettingsList.setRowEnabled(3, false);
OptionsMenuSettingsList.addOptionRow("VSync", "No\tYes", false, "", -1, -30, true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
OptionsMenuSettingsList.addOptionRow("VSync", "$pref::Video::disableVerticalSync", "No\tYes", false, "", true, "", convertBoolToYesNo(!$pref::Video::disableVerticalSync));
%refreshList = getScreenRefreshList($pref::Video::mode);
OptionsMenuSettingsList.addOptionRow("Refresh Rate", %refreshList, false, "", -1, -30, true, "", $pref::Video::RefreshRate);
OptionsMenuSettingsList.addOptionRow("Refresh Rate", "$pref::Video::RefreshRate", %refreshList, false, "", true, "", $pref::Video::RefreshRate);
//move to gameplay tab
OptionsMenuSettingsList.addSliderRow("Field of View", 75, 5, "65 100", "", -1, -30);
OptionsMenuSettingsList.addSliderRow("Field of View", "", 75, 5, "65 100", "");
OptionsMenuSettingsList.addSliderRow("Brightness", 0.5, 0.1, "0 1", "", -1, -30);
OptionsMenuSettingsList.addSliderRow("Contrast", 0.5, 0.1, "0 1", "", -1, -30);
OptionsMenuSettingsList.refresh();
OptionsMenuSettingsList.addSliderRow("Brightness", "", 0.5, 0.1, "0 1", "");
OptionsMenuSettingsList.addSliderRow("Contrast", "", 0.5, 0.1, "0 1", "");
}
function OptionsMenu::applyDisplaySettings(%this)
/*function OptionsMenu::applyDisplaySettings(%this)
{
%newDevice = OptionsMenuSettingsList.getCurrentOption(0);
@ -288,12 +352,14 @@ function OptionsMenu::applyDisplaySettings(%this)
echo("Exporting client prefs");
%prefPath = getPrefpath();
export("$pref::*", %prefPath @ "/clientPrefs." @ $TorqueScriptFileExtension, false);
}
}*/
function OptionsMenu::populateGraphicsSettingsList(%this)
//
//
//
function populateGraphicsSettingsList()
{
%this.pageTabIndex = 1;
OptionsMenuSettingsList.clearRows();
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
@ -303,92 +369,32 @@ function OptionsMenu::populateGraphicsSettingsList(%this)
%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();
OptionsMenuSettingsList.addOptionRow("Lighting Quality", "$pref::Graphics::LightingQuality", getQualityLevels(LightingQualityList), false, "", true, "Amount and drawdistance of local lights", getCurrentQualityLevel(LightingQualityList));
OptionsMenuSettingsList.addOptionRow("Shadow Quality", "$pref::Graphics::ShadowQuality", getQualityLevels(ShadowQualityList), false, "", true, "Shadow revolution quality", getCurrentQualityLevel(ShadowQualityList));
OptionsMenuSettingsList.addOptionRow("Soft Shadow Quality", "$pref::Graphics::SoftShadowQuality", getQualityLevels(SoftShadowList), false, "", true, "Amount of softening applied to shadowmaps", getCurrentQualityLevel(SoftShadowList));
OptionsMenuSettingsList.addOptionRow("Mesh Quality", "$pref::Graphics::MeshQuality", getQualityLevels(MeshQualityGroup), false, "", true, "Fidelity of rendering of mesh objects", getCurrentQualityLevel(MeshQualityGroup));
OptionsMenuSettingsList.addOptionRow("Object Draw Distance", "$pref::Graphics::ObjectDrawDistance", getQualityLevels(MeshDrawDistQualityGroup), false, "", true, "Dictates if and when static objects fade out in the distance", getCurrentQualityLevel(MeshDrawDistQualityGroup));
OptionsMenuSettingsList.addOptionRow("Texture Quality", "$pref::Graphics::TextureQuality", getQualityLevels(TextureQualityGroup), false, "", true, "Fidelity of textures", getCurrentQualityLevel(TextureQualityGroup));
OptionsMenuSettingsList.addOptionRow("Terrain Quality", "$pref::Graphics::TerrainQuality", getQualityLevels(TerrainQualityGroup), false, "", true, "Quality level of terrain objects", getCurrentQualityLevel(TerrainQualityGroup));
OptionsMenuSettingsList.addOptionRow("Decal Lifetime", "$pref::Graphics::DecalLifetime", getQualityLevels(DecalLifetimeGroup), false, "", true, "How long decals are rendered", getCurrentQualityLevel(DecalLifetimeGroup));
OptionsMenuSettingsList.addOptionRow("Ground Cover Density", "$pref::Graphics::GroundCoverDensity", getQualityLevels(GroundCoverDensityGroup), false, "", true, "Density of ground cover items, such as grass", getCurrentQualityLevel(GroundCoverDensityGroup));
OptionsMenuSettingsList.addOptionRow("Shader Quality", "$pref::Graphics::ShaderQuality", getQualityLevels(ShaderQualityGroup), false, "", true, "Dictates the overall shader quality level, adjusting what features are enabled.", getCurrentQualityLevel(ShaderQualityGroup));
OptionsMenuSettingsList.addOptionRow("Anisotropic Filtering", "$pref::Video::defaultAnisotropy", %anisoFilter, false, "", true, "Amount of Anisotropic Filtering on textures, which dictates their sharpness at a distance", $pref::Video::defaultAnisotropy);
OptionsMenuSettingsList.addOptionRow("Anti-Aliasing", "$pref::Video::AA", %aaFilter, false, "", true, "Amount of Post-Processing Anti-Aliasing applied to rendering", $pref::Video::AA);
OptionsMenuSettingsList.addOptionRow("Parallax", "$pref::Video::disableParallaxMapping", %onOffList, false, "", true, "Whether the surface parallax shader effect is enabled", convertBoolToOnOff(!$pref::Video::disableParallaxMapping));
OptionsMenuSettingsList.addOptionRow("Water Reflections", "$pref::Water::disableTrueReflections", %onOffList, false, "", true, "Whether water reflections are enabled", convertBoolToOnOff(!$pref::Water::disableTrueReflections));
OptionsMenuSettingsList.addOptionRow("SSAO", "$pref::PostFX::EnableSSAO", %onOffList, false, "", true, "Whether Screen-Space Ambient Occlusion is enabled", convertBoolToOnOff($pref::PostFX::EnableSSAO));
OptionsMenuSettingsList.addOptionRow("Depth of Field", "$pref::PostFX::EnableDOF", %onOffList, false, "", true, "Whether the Depth of Field effect is enabled", convertBoolToOnOff($pref::PostFX::EnableDOF));
OptionsMenuSettingsList.addOptionRow("Vignette", "$pref::PostFX::EnableVignette", %onOffList, false, "", true, "Whether the vignette effect is enabled", convertBoolToOnOff($pref::PostFX::EnableVignette));
OptionsMenuSettingsList.addOptionRow("Light Rays", "$pref::PostFX::EnableLightRays", %onOffList, false, "", true, "Whether the light rays effect is enabled", convertBoolToOnOff($pref::PostFX::EnableLightRays));
}
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);
%deviceName = getDisplayDeviceName();
%newDeviceID = getWord(%deviceName, 0) - 1;
%deviceModeName = OptionsMenuSettingsList.getCurrentOption(2);
%deviceModeName = getField($Video::ModeTags, $pref::Video::deviceMode);
%newDeviceMode = 0;
foreach$(%modeName in $Video::ModeTags)
{
@ -398,15 +404,15 @@ function updateDisplaySettings()
%newDeviceMode++;
}
%newRes = getWord(OptionsMenuSettingsList.getCurrentOption(3), 0) SPC getWord(OptionsMenuSettingsList.getCurrentOption(3), 2);
%newRes = $pref::Video::Resolution;
%newBpp = 32; // ... its not 1997 anymore.
%newFullScreen = %deviceModeName $= "Fullscreen" ? true : false;
%newRefresh = OptionsMenuSettingsList.getCurrentOption(5);
%newVsync = !convertOptionToBool(OptionsMenuSettingsList.getCurrentOption(4));
%newRefresh = $pref::Video::RefreshRate;
%newVsync = !$pref::Video::disableVerticalSync;
%newFSAA = $pref::Video::AA;
// Build the final mode string.
%newMode = %newRes SPC %newFullScreen SPC %newBpp SPC %newRefresh SPC %newFSAA;
%newMode = $pref::Video::Resolution SPC %newFullScreen SPC %newBpp SPC %newRefresh SPC %newFSAA;
// Change the video mode.
if ( %newMode !$= $pref::Video::mode || %newDeviceID != $pref::Video::deviceId ||
@ -439,10 +445,20 @@ function updateDisplaySettings()
}
}
function OptionsMenu::populateAudioSettingsList(%this)
function updatePostFXSettings()
{
%this.pageTabIndex = 2;
OptionsMenuSettingsList.clearRows();
PostFXManager.settingsEffectSetEnabled(SSAOPostFx, $pref::PostFX::EnableSSAO);
PostFXManager.settingsEffectSetEnabled(DOFPostEffect, $pref::PostFX::EnableDOF);
PostFXManager.settingsEffectSetEnabled(LightRayPostFX, $pref::PostFX::EnableLightRays);
PostFXManager.settingsEffectSetEnabled(vignettePostFX, $pref::PostFX::EnableVignette);
}
//
//
//
function populateAudioSettingsList()
{
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
@ -477,18 +493,15 @@ function OptionsMenu::populateAudioSettingsList(%this)
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.addOptionRow("Audio Provider", "$pref::SFX::AudioProvider", %audioProviderList, false, "audioProviderChanged", true, "", $currentAudioProvider);
OptionsMenuSettingsList.addOptionRow("Audio Device", "$pref::SFX::device", %audioDeviceList, false, "", 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();
OptionsMenuSettingsList.addSliderRow("Master Volume", "$pref::SFX::masterVolume", $pref::SFX::masterVolume, 0.1, "0 1", "");
OptionsMenuSettingsList.addSliderRow("GUI Volume", "$pref::SFX::channelVolume[ $GuiAudioType]", $pref::SFX::channelVolume[ $GuiAudioType], 0.1, "0 1", "");
OptionsMenuSettingsList.addSliderRow("Effects Volume", "$pref::SFX::channelVolume[ $SimAudioType ]", $pref::SFX::channelVolume[ $SimAudioType ], 0.1, "0 1", "");
OptionsMenuSettingsList.addSliderRow("Music Volume", "$pref::SFX::channelVolume[ $MusicAudioType ]", $pref::SFX::channelVolume[ $MusicAudioType ], 0.1, "0 1", "");
}
function audioProviderChanged()
@ -498,24 +511,24 @@ function audioProviderChanged()
$currentAudioProvider = %provider;
//And now refresh the list to get the correct devices
OptionsMenu.populateAudioSettingsList();
populateAudioSettingsList();
}
function OptionsMenu::applyAudioSettings(%this)
function updateAudioSettings()
{
$pref::SFX::masterVolume = OptionsMenuSettingsList.getValue(2);
//$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);
//$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);
//$pref::SFX::provider = OptionsMenuSettingsList.getCurrentOption(0);
//$pref::SFX::device = OptionsMenuSettingsList.getCurrentOption(1);
if ( !sfxCreateDevice( $pref::SFX::provider,
$pref::SFX::device,
@ -531,10 +544,12 @@ function OptionsMenu::applyAudioSettings(%this)
}
}
function OptionsMenu::populateKeyboardMouseSettingsList(%this)
//
//
//
function populateKeyboardMouseSettingsList()
{
%this.pageTabIndex = 3;
OptionsMenuSettingsList.clearRows();
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
@ -542,13 +557,12 @@ function OptionsMenu::populateKeyboardMouseSettingsList(%this)
$remapListDevice = "keyboard";
fillRemapList();
OptionsMenuSettingsList.refresh();
//OptionsMenuSettingsList.refresh();
}
function OptionsMenu::populateGamepadSettingsList(%this)
function populateGamepadSettingsList()
{
%this.pageTabIndex = 4;
OptionsMenuSettingsList.clearRows();
OptionsMenuSettingsList.clear();
OptionName.setText("");
OptionDescription.setText("");
@ -556,15 +570,30 @@ function OptionsMenu::populateGamepadSettingsList(%this)
$remapListDevice = "gamepad";
fillRemapList();
OptionsMenuSettingsList.refresh();
OptionsMenuSettingsList.updateStack();
}
//
//
//
function OptionsMenuList::activateRow(%this)
{
OptionsMenuSettingsList.setFirstResponder();
}
function OptionsMenu::backOut(%this)
{
if(%this.unappliedChanges.count() != 0)
{
MessageBoxOKCancel("Discard Changes?", "You have unapplied changes to your settings, do you wish to continue?", "OptionsMenu.doOptionsMenuBackOut();", "");
}
else
{
%this.doOptionsMenuBackOut();
}
}
function OptionsMenu::doOptionsMenuBackOut(%this)
{
//save the settings and then back out
if(OptionsMain.hidden == false)
@ -586,6 +615,117 @@ function OptionsMenu::backOut(%this)
}
}
function OptionsMenuSettingsList::setRowEnabled(%this, %row, %status)
{
%option = %this.getObject(%row);
if(isObject(%option))
{
%option.setEnabled(%status);
}
}
function OptionsMenuSettingsList::addOptionRow(%this, %label, %targetPrefVar, %optionsList, %wrapOptions, %callback, %enabled, %description, %defaultValue)
{
if(%enabled $= "")
%enabled = true;
%optionsRowSize = 30;
%optionColumnWidth = %this.extent.x - 450;//todo, calculate off longest option text?
%option = new GuiGameSettingsCtrl() {
class = "MenuOptionsButton";
profile = "GuiMenuButtonProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = %this.extent.x SPC %optionsRowSize;
columnSplit = %optionColumnWidth;
useMouseEvents = true;
previousBitmapAsset = "UI:previousOption_n_image";
nextBitmapAsset = "UI:nextOption_n_image";
};
%option.targetPrefVar = %targetPrefVar; //create a var-option association
//now some override trickery, if we have a value cached for unapplied changes, swapsies the defaultValue out
//with the unapplied, allowing us to change options categories without losing changes
%unappliedPrefIndex = OptionsMenu.unappliedChanges.getIndexFromValue(%targetPrefVar);
if(%unappliedPrefIndex != -1)
{
%unappliedValue = OptionsMenu.unappliedChanges.getValue(%unappliedPrefIndex);
%defaultValue = %unappliedValue;
}
%option.setListSetting(%label, %optionsList, %wrapOptions, %callback, %enabled, %description, %defaultValue);
%this.add(%option);
}
function OptionsMenuSettingsList::addSliderRow(%this, %label, %targetPrefVar, %defaultValue, %increment, %range, %callback, %enabled, %description)
{
if(%enabled $= "")
%enabled = true;
%optionsRowSize = 30;
%optionColumnWidth = %this.extent.x - 450;//todo, calculate off longest option text?
%option = new GuiGameSettingsCtrl() {
class = "MenuOptionsButton";
profile = "GuiMenuButtonProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = %this.extent.x SPC %optionsRowSize;
columnSplit = %optionColumnWidth;
useMouseEvents = true;
};
%option.targetPrefVar = %targetPrefVar; //create a var-option association
//now some override trickery, if we have a value cached for unapplied changes, swapsies the defaultValue out
//with the unapplied, allowing us to change options categories without losing changes
%unappliedPrefIndex = OptionsMenu.unappliedChanges.getIndexFromValue(%targetPrefVar);
if(%unappliedPrefIndex != -1)
{
%unappliedValue = OptionsMenu.unappliedChanges.getValue(%unappliedPrefIndex);
%defaultValue = %unappliedValue;
}
%option.setSliderSetting(%label, %defaultValue, %increment, %range, %callback, %enabled, %description);
%this.add(%option);
}
function OptionsMenuSettingsList::addKeybindRow(%this, %label, %bitmapName, %callback, %enabled, %description)
{
if(%enabled $= "")
%enabled = true;
%optionsRowSize = 40;
%optionColumnWidth = %this.extent.x - 450;
%option = new GuiGameSettingsCtrl() {
class = "MenuOptionsButton";
profile = "GuiMenuButtonProfile";
horizSizing = "width";
vertSizing = "bottom";
position = "0 0";
extent = %this.extent.x SPC %optionsRowSize;
columnSplit = %optionColumnWidth;
useMouseEvents = true;
};
%option.setKeybindSetting(%label, %bitmapName, %callback, %enabled, %description);
%this.add(%option);
}
//
function OptionsMenuCategoryList::onNavigate(%this, %index)
{
%this.getObject(%index).performClick();
}
function convertOptionToBool(%val)
{
if(%val $= "yes" || %val $= "on")
@ -685,4 +825,114 @@ function onDisplayResChange(%val)
OptionsMenuSettingsList.setOptions(5, %refreshList);
OptionsMenuSettingsList.selectOption(5, %newRate);
}
}
function getDisplayDeviceName()
{
%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;
}
return getField(%devicesList, $pref::Video::deviceId);
}
//
//
//
function MenuOptionsButton::onMouseEnter(%this)
{
OptionName.setText(%this.getLabel());
OptionDescription.setText(%this.getToolTip());
}
function MenuOptionsButton::onMouseLeave(%this)
{
OptionName.setText("");
OptionDescription.setText("");
}
function MenuOptionsButton::onChange(%this)
{
%optionMode = %this.getMode();
%optionName = %this.getLabel();
%tooltipText = %this.getTooltip();
%targetVar = %this.targetPrefVar;
OptionName.setText(%optionName);
OptionDescription.setText(%tooltipText);
%currentValue = %this.getCurrentOption();
if(%currentValue !$= "")
{
if(%currentValue $= "yes" || %currentValue $= "on")
%saveReadyValue = 1;
else if(%currentValue $= "no" || %currentValue $= "off")
%saveReadyValue = 0;
else
%saveReadyValue = %currentValue;
%prefIndex = OptionsMenu.unappliedChanges.getIndexFromKey(%targetVar);
if(%prefIndex == -1)
OptionsMenu.unappliedChanges.add(%targetVar, %saveReadyValue);
else
OptionsMenu.unappliedChanges.setValue(%saveReadyValue, %prefIndex);
}
}
function OptionsMenu::onKeybindChanged(%this, %actionMap, %keybind)
{
%prefIndex = OptionsMenu.unappliedChanges.getIndexFromKey(%actionMap);
if(%prefIndex == -1)
OptionsMenu.unappliedChanges.add(%actionMap, %keybind);
else
OptionsMenu.unappliedChanges.setValue(%keybind, %prefIndex);
}
//
// Indicates what category the options item should be added into
//
function addOptionsMenuCategory(%categoryName, %selectCallback)
{
OptionsMenu.optionsCategories.add(%categoryName, %selectCallback);
}
function removeOptionsMenuCategory(%categoryName)
{
%index = OptionsMenu.optionsCategories.getIndexFromKey(%categoryName);
if(%index != -1)
OptionsMenu.optionsCategories.erase(%index);
}
function addListOption(%label, %description, %targetPrefVar, %optionsList, %wrapOptions, %callback, %enabled)
{
if(%wrapOptions $= "")
%wrapOptions = false;
if(%enabled $= "")
%enabled = true;
OptionsMenuSettingsList.addOptionRow(%label, %targetPrefVar, %optionsList, %wrapOptions, %callback, %enabled, %description, %targetPrefVar);
}
function addSliderOption(%label, %description, %targetPrefVar, %defaultValue, %increment, %range, %callback, %enabled)
{
if(%enabled $= "")
%enabled = true;
OptionsMenuSettingsList.addSliderRow(%label, %targetPrefVar, %defaultValue, %increment, %range, %callback, %enabled, %description);
}
function addKeybindOption(%label, %description, %bitmapName, %callback, %enabled)
{
if(%enabled $= "")
%enabled = true;
OptionsMenuSettingsList.addSliderRow(%label, %bitmapName, %callback, %enabled, %description);
}

View file

@ -49,25 +49,31 @@ $guiContent = new GuiControl(PauseMenu) {
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
new GuiGameListMenuCtrl(PauseMenuList) {
debugRender = "0";
callbackOnInputs = "1";
consumeKeyInputEvents = "1";
new GuiStackControl(PauseMenuList) {
stackingType = "Vertical";
horizStacking = "Left to Right";
vertStacking = "Top to Bottom";
padding = "15";
dynamicSize = "0";
dynamicNonStackExtent = "0";
dynamicPos = "0";
changeChildSizeToFit = "1";
changeChildPosition = "1";
position = "0 0";
extent = "700 320";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "bottom";
profile = "DefaultListMenuProfile";
minExtent = "16 16";
horizSizing = "center";
vertSizing = "center";
profile = "GuiDefaultProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
class = "UIMenuButtonList";
isContainer = "1";
canSave = "1";
canSaveDynamicFields = "0";
class = "MenuList";
};
};
new GuiControl(PauseButtonHolder) {
@ -147,5 +153,26 @@ $guiContent = new GuiControl(PauseMenu) {
canSaveDynamicFields = "0";
};
};
new GuiInputCtrl(PauseMenuInputHandler) {
class = "MenuInputHandler";
sendAxisEvents = "1";
sendBreakEvents = "1";
sendModifierEvents = "0";
ignoreMouseEvents = "1";
lockMouse = "0";
position = "-50 0";
extent = "10 10";
minExtent = "8 2";
horizSizing = "width";
vertSizing = "height";
profile = "GuiInputCtrlProfile";
visible = "1";
active = "1";
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
};
//--- OBJECT WRITE END ---

View file

@ -8,19 +8,21 @@ function PauseMenu::onWake(%this)
}
PauseMenuList.hidden = false;
PauseMenuList.setFirstResponder();
PauseButtonHolder.setActive();
PauseMenuList.clearRows();
PauseMenuList.clear();
if($Tools::loaded && EditorIsActive())
{
PauseMenuList.addRow("Exit Editor", "fastLoadWorldEdit", -1, -30);
%this.addPauseMenuButton("Exit Editor", "fastLoadWorldEdit();");
}
PauseMenuList.addRow("Options", "openPauseMenuOptions", -1, -30);
PauseMenuList.addRow("Exit to Menu", "pauseMenuExitToMenu", -1, -30);
PauseMenuList.addRow("Exit to Desktop", "pauseMenuExitToDesktop", -1, -30);
%this.addPauseMenuButton("Options", "openPauseMenuOptions();");
%this.addPauseMenuButton("Exit to Menu", "pauseMenuExitToMenu();");
%this.addPauseMenuButton("Exit to Desktop", "pauseMenuExitToDesktop();");
PauseMenuList.setAsActiveMenuList();
PauseButtonHolder.setActive();
PauseMenuInputHandler.setFirstResponder();
}
@ -36,8 +38,9 @@ function PauseMenu::onSleep(%this)
function PauseMenu::onReturnTo(%this)
{
PauseMenuList.hidden = false;
PauseMenuList.setFirstResponder();
PauseMenuList.setAsActiveMenuList();
PauseButtonHolder.setActive();
PauseMenuInputHandler.setFirstResponder();
}
function openPauseMenuOptions()
@ -61,6 +64,32 @@ function pauseMenuExitToDesktop()
function PauseButtonHolder::onWake(%this)
{
%this-->goButton.set("btn_a", "Return", "OK", "PauseMenuList.activateRow();", true);
%this-->goButton.set("btn_a", "Return", "OK", "PauseMenuList.activate();", true);
%this-->backButton.set("btn_b", "Escape", "Back", "Canvas.popDialog();");
}
}
function PauseMenu::addPauseMenuButton(%this, %buttonText, %buttonCallback)
{
%newButton = new GuiButtonCtrl() {
text = %buttonText;
groupNum = "-1";
buttonType = "PushButton";
useMouseEvents = "0";
position = "0 0";
extent = "400 55";
minExtent = "8 2";
horizSizing = "right";
vertSizing = "bottom";
profile = "GuiMenuButtonProfile";
visible = "1";
active = "1";
command = %buttonCallback;
tooltipProfile = "GuiToolTipProfile";
hovertime = "1000";
isContainer = "0";
canSave = "1";
canSaveDynamicFields = "0";
};
PauseMenuList.add(%newButton);
}

View file

@ -363,4 +363,4 @@ function metrics( %expr )
}
else
$GameCanvas.popDialog(FrameOverlayGui);
}
}

View file

@ -1,7 +1,4 @@
<GUIAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="recordingsDlg"
scriptFile="@assetFile=RecordingsDlg.gui"
GUIFile="@assetFile=RecordingsDlg.gui"
VersionId="1" />
VersionId="1"/>

View file

@ -35,7 +35,7 @@ $guiContent = new GuiFadeinBitmapCtrl(StartupGui) {
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
bitmap = "";
bitmapAsset = "";
wrap = "0";
command = "StartupGui.click();";
};
@ -54,7 +54,7 @@ $guiContent = new GuiFadeinBitmapCtrl(StartupGui) {
Visible = "1";
tooltipprofile = "GuiToolTipProfile";
hovertime = "1000";
bitmap = "";
bitmapAsset = "";
wrap = "0";
command = "StartupGui.click();";
};

View file

@ -32,7 +32,7 @@ function loadStartup()
// 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.bitmap[0] = "UI:backgrounddark_image";
StartupGui.logo[0] = "UI:Torque_3D_logo_alt_image";
StartupGui.logoPos[0] = "178 251";
StartupGui.logoExtent[0] = "443 139";

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

View file

@ -2,7 +2,7 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="Torque_3D_logo_alt_image"
imageFile="@assetFile=Torque-3D-logo_alt.png"
imageFile="@assetFile=Torque_3D_logo_alt.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -2,7 +2,7 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="Torque_3D_logo_image"
imageFile="@assetFile=Torque-3D-logo.png"
imageFile="@assetFile=Torque_3D_logo.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -2,7 +2,7 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="Torque_3D_logo_shortcut_image"
imageFile="@assetFile=Torque-3D-logo-shortcut.png"
imageFile="@assetFile=Torque_3D_logo_shortcut.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

@ -2,7 +2,7 @@
canSave="true"
canSaveDynamicFields="true"
AssetName="Torque_3D_logo_w_image"
imageFile="@assetFile=Torque-3D-logo-w.png"
imageFile="@assetFile=Torque_3D_logo_w.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

@ -1,8 +0,0 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="background_dark_image"
imageFile="@assetFile=background-dark.png"
UseMips="true"
isHDRImage="false"
imageType="Albedo" />

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="backgrounddark_image"
imageFile="@assetFile=backgrounddark.png"/>

View file

Before

Width:  |  Height:  |  Size: 593 B

After

Width:  |  Height:  |  Size: 593 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="clearbtn_d_image"
imageFile="@assetFile=clearbtn_d.png"/>

View file

Before

Width:  |  Height:  |  Size: 595 B

After

Width:  |  Height:  |  Size: 595 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="clearbtn_h_image"
imageFile="@assetFile=clearbtn_h.png"/>

View file

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="clearbtn_n_image"
imageFile="@assetFile=clearbtn_n.png"/>

View file

Before

Width:  |  Height:  |  Size: 280 B

After

Width:  |  Height:  |  Size: 280 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="collapsetoolbar_d_image"
imageFile="@assetFile=collapsetoolbar_d.png"/>

View file

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="collapsetoolbar_h_image"
imageFile="@assetFile=collapsetoolbar_h.png"/>

View file

Before

Width:  |  Height:  |  Size: 439 B

After

Width:  |  Height:  |  Size: 439 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="collapsetoolbar_n_image"
imageFile="@assetFile=collapsetoolbar_n.png"/>

View file

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="dropdownbuttonarrow_image"
imageFile="@assetFile=dropdownbuttonarrow.png"/>

View file

Before

Width:  |  Height:  |  Size: 390 B

After

Width:  |  Height:  |  Size: 390 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="dropdowntextEdit_image"
imageFile="@assetFile=dropdowntextEdit.png"/>

View file

Before

Width:  |  Height:  |  Size: 278 B

After

Width:  |  Height:  |  Size: 278 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="expandtoolbar_d_image"
imageFile="@assetFile=expandtoolbar_d.png"/>

View file

Before

Width:  |  Height:  |  Size: 468 B

After

Width:  |  Height:  |  Size: 468 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="expandtoolbar_h_image"
imageFile="@assetFile=expandtoolbar_h.png"/>

View file

Before

Width:  |  Height:  |  Size: 437 B

After

Width:  |  Height:  |  Size: 437 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="expandtoolbar_n_image"
imageFile="@assetFile=expandtoolbar_n.png"/>

View file

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="groupborder_image"
imageFile="@assetFile=groupborder.png"/>

View file

Before

Width:  |  Height:  |  Size: 131 B

After

Width:  |  Height:  |  Size: 131 B

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="inactiveoverlay_image"
imageFile="@assetFile=inactiveoverlay.png"/>

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -0,0 +1,3 @@
<ImageAsset
AssetName="menubutton_image"
imageFile="@assetFile=menubutton.png"/>

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

View file

@ -0,0 +1,8 @@
<ImageAsset
canSave="true"
canSaveDynamicFields="true"
AssetName="nextOption_n_image"
imageFile="@assetFile=nextOption_n.png"
UseMips="true"
isHDRImage="false"
imageType="GUI" />

View file

Before

Width:  |  Height:  |  Size: 279 B

After

Width:  |  Height:  |  Size: 279 B

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