mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 07:20:40 +00:00
Adds test shapes of Kork and SpaceOrc
Sidestep of memleak from CSF at the moment Minor fixes and corrections with asset importing and loose files WIP of updated options menu
This commit is contained in:
parent
98c4606b3c
commit
ae857faae2
40 changed files with 765 additions and 182 deletions
|
|
@ -372,7 +372,7 @@ function _makePrettyResString( %resString )
|
|||
function GraphicsMenuSetting::init( %this )
|
||||
{
|
||||
assert( isObject( %this ) );
|
||||
assert( isObject( %this.qualitySettingGroup ) );
|
||||
//assert( isObject( %this.qualitySettingGroup ) );
|
||||
|
||||
// Fill it.
|
||||
%select = -1;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,10 @@
|
|||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="0 0"
|
||||
extent="700 35"
|
||||
position="0 105"
|
||||
extent="739 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
horizSizing="width"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
|
|
@ -21,11 +21,12 @@
|
|||
canSaveDynamicFields="false">
|
||||
<GuiBitmapCtrl
|
||||
bitmap="data/ui/art/hudfill.png"
|
||||
color="255 255 255 255"
|
||||
wrap="false"
|
||||
position="0 0"
|
||||
extent="450 35"
|
||||
extent="739 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
|
|
@ -35,104 +36,6 @@
|
|||
isContainer="false"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiContainer
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="450 0"
|
||||
extent="250 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiDefaultProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false">
|
||||
<GuiBitmapCtrl
|
||||
bitmap="data/ui/art/hudfill.png"
|
||||
wrap="false"
|
||||
position="35 0"
|
||||
extent="180 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="High"
|
||||
maxLength="1024"
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="35 0"
|
||||
extent="180 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
internalName="SettingText"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiButtonCtrl
|
||||
text=">"
|
||||
groupNum="-1"
|
||||
buttonType="PushButton"
|
||||
useMouseEvents="true"
|
||||
position="215 0"
|
||||
extent="35 35"
|
||||
minExtent="8 8"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
class="OptionsMenuForwardSetting"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiButtonCtrl
|
||||
text="<"
|
||||
groupNum="-1"
|
||||
buttonType="PushButton"
|
||||
useMouseEvents="true"
|
||||
position="0 0"
|
||||
extent="35 35"
|
||||
minExtent="8 8"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
class="OptionsMenuBackSetting"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
</GuiContainer>
|
||||
<GuiTextCtrl
|
||||
text="Shadow Quality"
|
||||
maxLength="1024"
|
||||
|
|
@ -143,9 +46,9 @@
|
|||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="0 0"
|
||||
extent="450 35"
|
||||
extent="350 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="right"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
|
|
@ -156,4 +59,65 @@
|
|||
internalName="nameText"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiTextCtrl
|
||||
text="High"
|
||||
maxLength="1024"
|
||||
margin="0 0 0 0"
|
||||
padding="0 0 0 0"
|
||||
anchorTop="true"
|
||||
anchorBottom="false"
|
||||
anchorLeft="true"
|
||||
anchorRight="false"
|
||||
position="350 0"
|
||||
extent="350 35"
|
||||
minExtent="8 2"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="true"
|
||||
internalName="SettingText"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiButtonCtrl
|
||||
text=">"
|
||||
groupNum="-1"
|
||||
buttonType="PushButton"
|
||||
useMouseEvents="true"
|
||||
position="682 0"
|
||||
extent="36 35"
|
||||
minExtent="8 8"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
class="OptionsMenuForwardSetting"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
<GuiButtonCtrl
|
||||
text="<"
|
||||
groupNum="-1"
|
||||
buttonType="PushButton"
|
||||
useMouseEvents="true"
|
||||
position="348 0"
|
||||
extent="36 35"
|
||||
minExtent="8 8"
|
||||
horizSizing="relative"
|
||||
vertSizing="bottom"
|
||||
profile="GuiMenuButtonProfile"
|
||||
visible="true"
|
||||
active="true"
|
||||
tooltipProfile="GuiToolTipProfile"
|
||||
hovertime="1000"
|
||||
isContainer="false"
|
||||
class="OptionsMenuBackSetting"
|
||||
canSave="true"
|
||||
canSaveDynamicFields="false" />
|
||||
</GuiContainer>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "1";
|
||||
enabled = "1";
|
||||
Enabled = "1";
|
||||
isDecoy = "0";
|
||||
|
||||
new GuiBitmapButtonCtrl(MainMenuAppLogo) {
|
||||
|
|
@ -47,10 +47,10 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
canSaveDynamicFields = "1";
|
||||
};
|
||||
new GuiControl(MainMenuButtonContainer) {
|
||||
position = "557 193";
|
||||
position = "20 193";
|
||||
extent = "442 381";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "left";
|
||||
horizSizing = "right";
|
||||
vertSizing = "center";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
|
|
@ -97,7 +97,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuGui.openSinglePlayerMenu();";
|
||||
|
|
@ -117,7 +117,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuGui.openMultiPlayerMenu();";
|
||||
|
|
@ -137,7 +137,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "Canvas.pushDialog(JoinServerMenu);";
|
||||
|
|
@ -157,7 +157,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "MainMenuGui.openOptionsMenu();";
|
||||
|
|
@ -177,7 +177,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "fastLoadWorldEdit(1);";
|
||||
|
|
@ -197,7 +197,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "fastLoadGUIEdit(1);";
|
||||
|
|
@ -217,7 +217,7 @@ exec( "tools/gui/profiles.ed.cs" );
|
|||
minExtent = "8 8";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiBlankMenuButtonProfile";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
command = "quit();";
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@
|
|||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "139 118";
|
||||
position = "162 125";
|
||||
extent = "700 518";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "center";
|
||||
|
|
@ -5698,5 +5698,222 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "20 70";
|
||||
extent = "380 602";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "relative";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
bitmap = "data/ui/art/hudfill.png";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
extent = "380 602";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "0 0";
|
||||
extent = "380 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl() {
|
||||
bitmap = "data/ui/art/hudfill.png";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
extent = "380 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiTextCtrl() {
|
||||
text = "Options";
|
||||
maxLength = "1024";
|
||||
margin = "0 0 0 0";
|
||||
padding = "0 0 0 0";
|
||||
anchorTop = "1";
|
||||
anchorBottom = "0";
|
||||
anchorLeft = "1";
|
||||
anchorRight = "0";
|
||||
position = "0 0";
|
||||
extent = "380 20";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiMenuButtonProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
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 25";
|
||||
extent = "380 577";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiScrollProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiStackControl(OptionsSettingStack) {
|
||||
stackingType = "Vertical";
|
||||
horizStacking = "Left to Right";
|
||||
vertStacking = "Top to Bottom";
|
||||
padding = "0";
|
||||
dynamicSize = "1";
|
||||
dynamicNonStackExtent = "0";
|
||||
dynamicPos = "0";
|
||||
changeChildSizeToFit = "1";
|
||||
changeChildPosition = "1";
|
||||
position = "1 1";
|
||||
extent = "380 64";
|
||||
minExtent = "16 16";
|
||||
horizSizing = "width";
|
||||
vertSizing = "bottom";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
new GuiControl() {
|
||||
position = "416 96";
|
||||
extent = "576 576";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "relative";
|
||||
vertSizing = "relative";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "1";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
|
||||
new GuiBitmapCtrl(OptionsPreviewCtrl) {
|
||||
bitmap = "data/ui/art/hudfill.png";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
extent = "576 576";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "height";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiBitmapCtrl() {
|
||||
bitmap = "data/ui/art/no-preview.png";
|
||||
color = "255 255 255 255";
|
||||
wrap = "0";
|
||||
position = "0 0";
|
||||
extent = "577 528";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "relative";
|
||||
profile = "GuiDefaultProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
new GuiMLTextCtrl() {
|
||||
lineSpacing = "2";
|
||||
allowColorChars = "0";
|
||||
maxChars = "-1";
|
||||
text = "This is a test message to act as a tooltip for any selected options menus for more information on the given option.";
|
||||
useURLMouseCursor = "0";
|
||||
position = "0 528";
|
||||
extent = "578 14";
|
||||
minExtent = "8 2";
|
||||
horizSizing = "width";
|
||||
vertSizing = "top";
|
||||
profile = "GuiMLWhiteTextProfile";
|
||||
visible = "1";
|
||||
active = "1";
|
||||
tooltipProfile = "GuiToolTipProfile";
|
||||
hovertime = "1000";
|
||||
isContainer = "0";
|
||||
canSave = "1";
|
||||
canSaveDynamicFields = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
//--- OBJECT WRITE END ---
|
||||
|
|
|
|||
|
|
@ -58,6 +58,87 @@ function OptionsMenu::onWake(%this)
|
|||
OptionsOKButton.hidden = false;
|
||||
OptionsCancelButton.hidden = false;
|
||||
OptionsDefaultsButton.hidden = false;
|
||||
|
||||
OptionsMenu.tamlReader = new Taml();
|
||||
|
||||
OptionsSettingStack.clear();
|
||||
|
||||
%array = OptionsSettingStack;
|
||||
%array.clear();
|
||||
|
||||
%controllerMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Keyboard and Mouse";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%displayMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Controller";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%keyboardMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Display";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%graphicsMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Graphics";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%audioMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Audio";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%gameplayMenuBtn = new GuiButtonCtrl(){
|
||||
text = "Gameplay";
|
||||
profile = GuiMenuButtonProfile;
|
||||
extent = %array.extent.x SPC "35";
|
||||
};
|
||||
|
||||
%array.add(%keyboardMenuBtn);
|
||||
%array.add(%controllerMenuBtn);
|
||||
%array.add(%displayMenuBtn);
|
||||
%array.add(%graphicsMenuBtn);
|
||||
%array.add(%audioMenuBtn);
|
||||
%array.add(%gameplayMenuBtn);
|
||||
|
||||
//We programmatically set up our settings here so we can do some prepwork on the fields/controls
|
||||
//Presets
|
||||
/*OptionsMenu.addSettingOption(%array, "Preset", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
|
||||
//AA
|
||||
OptionsMenu.addSettingOption(%array, "AntiAliasing", "FXAA 4x", ShadowQualityList, $pref::Video::Resolution);
|
||||
|
||||
//Lighting
|
||||
OptionsMenu.addSettingOption(%array, "Shadow Quality", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Shadow Caching", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Soft Shadows", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
|
||||
//Models and Textures
|
||||
OptionsMenu.addSettingOption(%array, "Level of Detail", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Texture Quality", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Material Quality", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Terrain Detail", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Decal Lifetime", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Ground Clutter Density", "High", ShadowQualityList, $pref::Video::Resolution);
|
||||
|
||||
//Effects
|
||||
OptionsMenu.addSettingOption(%array, "HDR", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Parallax", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Ambient Occlusion", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Light Rays", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Depth of Field", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Vignetting", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
OptionsMenu.addSettingOption(%array, "Water Reflections", "On", ShadowQualityList, $pref::Video::Resolution);
|
||||
|
||||
OptionsMenu.addSettingOption(%array, "Anisotropic Filtering", "16x", ShadowQualityList, $pref::Video::Resolution);*/
|
||||
}
|
||||
|
||||
function OptionsMenuOKButton::onClick(%this)
|
||||
|
|
@ -139,53 +220,62 @@ function OptionsMenu::backOut(%this)
|
|||
}
|
||||
}
|
||||
|
||||
function OptionsMenu::addSettingOption(%this, %arrayTarget)
|
||||
function OptionsMenu::addSettingOption(%this, %arrayTarget, %optionName, %defaultValue, %settingsGroup, %targetVar)
|
||||
{
|
||||
%graphicsOption = OptionsMenu.tamlReader.read("data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml");
|
||||
%option = TAMLRead("data/ui/scripts/guis/graphicsMenuSettingsCtrl.taml");
|
||||
|
||||
%option-->nameText.text = %optionName;
|
||||
%option-->SettingText.text = %defaultValue;
|
||||
%option.qualitySettingGroup = %settingsGroup;
|
||||
%option.targetVar = %targetVar;
|
||||
|
||||
%option.init();
|
||||
|
||||
%arrayTarget.add(%graphicsOption);
|
||||
%arrayTarget.add(%option);
|
||||
|
||||
return %graphicsOption;
|
||||
return %option;
|
||||
}
|
||||
|
||||
function OptionsMenu::addSliderOption(%this, %arrayTarget, %range, %ticks, %variable, %value, %class)
|
||||
function OptionsMenu::addSliderOption(%this, %arrayTarget, %optionName, %variable, %range, %ticks, %value, %class)
|
||||
{
|
||||
%graphicsOption = OptionsMenu.tamlReader.read("data/ui/scripts/guis/graphicsMenuSettingsSlider.taml");
|
||||
%option = TAMLRead("data/ui/scripts/guis/graphicsMenuSettingsSlider.taml");
|
||||
|
||||
%option-->nameText.text = %optionName;
|
||||
|
||||
%arrayTarget.add(%graphicsOption);
|
||||
%arrayTarget.add(%option);
|
||||
|
||||
if(%range !$= "")
|
||||
{
|
||||
%graphicsOption-->slider.range = %range;
|
||||
%option-->slider.range = %range;
|
||||
}
|
||||
|
||||
if(%ticks !$= "")
|
||||
{
|
||||
%graphicsOption-->slider.ticks = %ticks;
|
||||
%option-->slider.ticks = %ticks;
|
||||
}
|
||||
|
||||
if(%variable !$= "")
|
||||
{
|
||||
%graphicsOption-->slider.variable = %variable;
|
||||
%option-->slider.variable = %variable;
|
||||
}
|
||||
|
||||
if(%value !$= "")
|
||||
{
|
||||
%graphicsOption-->slider.setValue(%value);
|
||||
%option-->slider.setValue(%value);
|
||||
}
|
||||
|
||||
if(%class !$= "")
|
||||
{
|
||||
%graphicsOption-->slider.className = %class;
|
||||
%option-->slider.className = %class;
|
||||
}
|
||||
else
|
||||
%graphicsOption-->slider.className = OptionsMenuSlider;
|
||||
%option-->slider.className = OptionsMenuSlider;
|
||||
|
||||
%graphicsOption-->slider.snap = true;
|
||||
%option-->slider.snap = true;
|
||||
|
||||
%graphicsOption-->slider.onValueSet();
|
||||
%option-->slider.onValueSet();
|
||||
|
||||
return %graphicsOption;
|
||||
return %option;
|
||||
}
|
||||
|
||||
function OptionsMenuSlider::onMouseDragged(%this)
|
||||
|
|
@ -208,6 +298,65 @@ function FOVOptionSlider::onValueSet(%this)
|
|||
%this.getParent().getParent()-->valueText.setText(mRound(%this.value));
|
||||
}
|
||||
|
||||
function OptionsMenuForwardSetting::onClick(%this)
|
||||
{
|
||||
//we need to advance through the value list, unless it's the end, in which case we do nothing
|
||||
echo("Move forward in the list!");
|
||||
|
||||
%settingCtrl = %this.getParent();
|
||||
for ( %i=0; %i < %settingCtrl.qualitySettingGroup.getCount(); %i++ )
|
||||
{
|
||||
%level = %settingCtrl.qualitySettingGroup.getObject( %i );
|
||||
|
||||
if(%settingCtrl.selectedLevel == %i)
|
||||
{
|
||||
//k, shift it
|
||||
if(%i == %settingCtrl.qualitySettingGroup.getCount() - 1)
|
||||
{
|
||||
//oh, we're at the end. Do nothing.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
%newLevel = %settingCtrl.qualitySettingGroup.getObject( %i + 1 );
|
||||
%settingCtrl-->SettingText.setText( %newLevel.displayName );
|
||||
OptionsPreviewCtrl.bitmap = %newLevel.previewImage;
|
||||
%settingCtrl.selectedLevel = %i + 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function OptionsMenuBackSetting::onClick(%this)
|
||||
{
|
||||
//we need to advance through the value list, unless it's the end, in which case we do nothing
|
||||
echo("Move back in the list!");
|
||||
|
||||
%settingCtrl = %this.getParent();
|
||||
for ( %i=0; %i < %settingCtrl.qualitySettingGroup.getCount(); %i++ )
|
||||
{
|
||||
%level = %settingCtrl.qualitySettingGroup.getObject( %i );
|
||||
|
||||
if(%settingCtrl.selectedLevel == %i)
|
||||
{
|
||||
//k, shift it
|
||||
if(%i == 0)
|
||||
{
|
||||
//oh, we're at the end. Do nothing.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
%newLevel = %settingCtrl.qualitySettingGroup.getObject( %i - 1 );
|
||||
%settingCtrl-->SettingText.setText( %newLevel.displayName );
|
||||
%settingCtrl.selectedLevel = %i - 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Returns true if the current quality settings equal
|
||||
/// this graphics quality level.
|
||||
function OptionsMenuSettingLevel::isCurrent( %this )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue