custom graphics setting

This commit is contained in:
Bitl 2020-07-18 18:33:10 -07:00
parent 308465e055
commit c43571a8a6
14 changed files with 3283 additions and 232 deletions

View File

@ -150,7 +150,7 @@ namespace NovetusCMD
{
GlobalFuncs.Config(GlobalPaths.ConfigDir + "\\" + GlobalPaths.ConfigName, false);
GlobalFuncs.ConsolePrint("Config loaded.", 3);
GlobalFuncs.ReadClientValues();
GlobalFuncs.ReadClientValues(initial);
}
#endregion

View File

@ -449,6 +449,27 @@ public static class RobloxXML
}
}
public static string GetRenderSettings(XDocument doc, string setting, XMLTypes type)
{
var v = from nodes in doc.Descendants("Item")
where nodes.Attribute("class").Value == "RenderSettings"
select nodes;
foreach (var item in v)
{
var v2 = from nodes in item.Descendants(GetStringForXMLType(type))
where nodes.Attribute("name").Value == setting
select nodes;
foreach (var item2 in v2)
{
return item2.Value;
}
}
return "";
}
private static void DownloadFilesFromNode(string url, string path, string fileext, string id)
{
if (!string.IsNullOrWhiteSpace(id))

View File

@ -22,7 +22,8 @@ public class Settings
Low = 2,
Medium = 3,
High = 4,
Ultra = 5
Ultra = 5,
Custom = 6
}
public enum ClientLoadOptions
@ -78,6 +79,8 @@ public class Settings
return Level.Medium;
case 4:
return Level.High;
case 6:
return Level.Custom;
case 5:
default:
return Level.Ultra;
@ -98,6 +101,8 @@ public class Settings
return 3;
case Level.High:
return 4;
case Level.Custom:
return 6;
case Level.Ultra:
default:
return 5;

View File

@ -915,6 +915,134 @@ public class GlobalFuncs
{
FileFormat.ClientInfo info = GetClientInfoValues(ClientName);
if (GlobalVars.UserConfiguration.QualityLevel != Settings.GraphicsOptions.Level.Custom)
{
int GraphicsMode = 0;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomatic)
{
GraphicsMode = 1;
}
else
{
if (info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions)
{
switch (GlobalVars.UserConfiguration.GraphicsMode)
{
case Settings.GraphicsOptions.Mode.OpenGL:
switch (info.ClientLoadOptions)
{
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
case Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_LegacyOpenGL:
case Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL:
GraphicsMode = 2;
break;
case Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp:
case Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21:
GraphicsMode = 4;
break;
default:
break;
}
break;
case Settings.GraphicsOptions.Mode.DirectX:
GraphicsMode = 3;
break;
default:
GraphicsMode = 1;
break;
}
}
}
//default values are ultra settings
int MeshDetail = 100;
int ShadingQuality = 100;
int GFXQualityLevel = 19;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21)
{
GFXQualityLevel = 21;
}
int MaterialQuality = 3;
int AASamples = 8;
int Bevels = 1;
int Shadows_2008 = 1;
int AA = 1;
bool Shadows_2007 = true;
switch (GlobalVars.UserConfiguration.QualityLevel)
{
case Settings.GraphicsOptions.Level.Automatic:
//set everything to automatic. Some ultra settings will still be enabled.
AA = 0;
Bevels = 0;
Shadows_2008 = 0;
GFXQualityLevel = 0;
MaterialQuality = 0;
break;
case Settings.GraphicsOptions.Level.VeryLow:
AA = 2;
MeshDetail = 50;
ShadingQuality = 50;
GFXQualityLevel = 1;
MaterialQuality = 1;
AASamples = 1;
Bevels = 2;
Shadows_2008 = 2;
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.Low:
AA = 2;
MeshDetail = 50;
ShadingQuality = 50;
GFXQualityLevel = 5;
MaterialQuality = 1;
AASamples = 1;
Bevels = 2;
Shadows_2008 = 2;
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.Medium:
MeshDetail = 75;
ShadingQuality = 75;
GFXQualityLevel = 10;
MaterialQuality = 2;
AASamples = 4;
Bevels = 2;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomatic ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL)
{
Shadows_2008 = 3;
}
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.High:
MeshDetail = 75;
ShadingQuality = 75;
GFXQualityLevel = 15;
AASamples = 4;
break;
case Settings.GraphicsOptions.Level.Ultra:
default:
break;
}
ApplyClientSettings(info, ClientName, GraphicsMode, MeshDetail, ShadingQuality, MaterialQuality, AA, AASamples, Bevels,
Shadows_2008, Shadows_2007, GFXQualityLevel);
}
}
//oh god....
//we're using this one for custom graphics quality. Better than the latter.
public static void ApplyClientSettings_custom(FileFormat.ClientInfo info, string ClientName, int MeshDetail, int ShadingQuality, int MaterialQuality,
int AA, int AASamples, int Bevels, int Shadows_2008, bool Shadows_2007, int GFXQualityLevel)
{
int GraphicsMode = 0;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
@ -927,7 +1055,6 @@ public class GlobalFuncs
if (info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2007_NoGraphicsOptions ||
info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_NoGraphicsOptions)
{
switch (GlobalVars.UserConfiguration.GraphicsMode)
{
case Settings.GraphicsOptions.Mode.OpenGL:
@ -956,81 +1083,14 @@ public class GlobalFuncs
}
}
//default values are ultra settings
int MeshDetail = 100;
int ShadingQuality = 100;
int GFXQualityLevel = 19;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21)
{
GFXQualityLevel = 21;
}
int MaterialQuality = 3;
int AASamples = 8;
int Bevels = 1;
int Shadows_2008 = 1;
int AA = 1;
bool Shadows_2007 = true;
switch (GlobalVars.UserConfiguration.QualityLevel)
{
case Settings.GraphicsOptions.Level.Automatic:
//set everything to automatic. Some ultra settings will still be enabled.
AA = 0;
Bevels = 0;
Shadows_2008 = 0;
GFXQualityLevel = 0;
MaterialQuality = 0;
break;
case Settings.GraphicsOptions.Level.VeryLow:
AA = 2;
MeshDetail = 50;
ShadingQuality = 50;
GFXQualityLevel = 1;
MaterialQuality = 1;
AASamples = 1;
Bevels = 2;
Shadows_2008 = 2;
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.Low:
AA = 2;
MeshDetail = 50;
ShadingQuality = 50;
GFXQualityLevel = 5;
MaterialQuality = 1;
AASamples = 1;
Bevels = 2;
Shadows_2008 = 2;
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.Medium:
MeshDetail = 75;
ShadingQuality = 75;
GFXQualityLevel = 10;
MaterialQuality = 2;
AASamples = 4;
Bevels = 2;
if (info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomatic ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21 ||
info.ClientLoadOptions == Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_HasCharacterOnlyShadowsLegacyOpenGL)
{
Shadows_2008 = 3;
}
Shadows_2007 = false;
break;
case Settings.GraphicsOptions.Level.High:
MeshDetail = 75;
ShadingQuality = 75;
GFXQualityLevel = 15;
AASamples = 4;
break;
case Settings.GraphicsOptions.Level.Ultra:
default:
break;
}
ApplyClientSettings(info, ClientName, GraphicsMode, MeshDetail, ShadingQuality, MaterialQuality,
AA, AASamples, Bevels, Shadows_2008, Shadows_2007, GFXQualityLevel);
}
//it's worse.
public static void ApplyClientSettings(FileFormat.ClientInfo info, string ClientName, int GraphicsMode, int MeshDetail, int ShadingQuality, int MaterialQuality,
int AA, int AASamples, int Bevels, int Shadows_2008, bool Shadows_2007, int GFXQualityLevel)
{
try
{
string terms = "_" + ClientName;
@ -1193,8 +1253,6 @@ public class GlobalFuncs
ReadClientValues(ClientName);
#endif
ChangeGameSettings(ClientName);
string luafile = GetLuaFileName(ClientName);
string rbxexe = GetClientEXEDir(ClientName, type);
string mapfile = type.Equals(ScriptType.EasterEgg) ? GlobalPaths.ConfigDirData + "\\Appreciation.rbxl" : (nomap ? "" : GlobalVars.UserConfiguration.MapPath);

View File

@ -108,8 +108,6 @@ public class ScriptFuncs
public static void GenerateScriptForClient(string ClientName, ScriptType type)
{
GlobalFuncs.ChangeGameSettings(ClientName);
string code = GlobalFuncs.MultiLine(
"--Load Script",
//scriptcontents,
@ -263,7 +261,6 @@ public class ScriptFuncs
string end = endtag;
FileFormat.ClientInfo info = GlobalFuncs.GetClientInfoValues(ClientName);
GlobalFuncs.ChangeGameSettings(ClientName);
ScriptType type = GetTypeFromTag(start);

View File

@ -0,0 +1,319 @@
namespace NovetusLauncher
{
partial class CustomGraphicsOptions
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CustomGraphicsOptions));
this.label1 = new System.Windows.Forms.Label();
this.GraphicsLevel = new System.Windows.Forms.NumericUpDown();
this.GraphicsMeshQuality = new System.Windows.Forms.NumericUpDown();
this.label2 = new System.Windows.Forms.Label();
this.GraphicsShadingQuality = new System.Windows.Forms.NumericUpDown();
this.label3 = new System.Windows.Forms.Label();
this.GraphicsMaterialQuality = new System.Windows.Forms.ComboBox();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.GraphicsAntiAliasing = new System.Windows.Forms.ComboBox();
this.label6 = new System.Windows.Forms.Label();
this.GraphicsAASamples = new System.Windows.Forms.ComboBox();
this.GraphicsBevels = new System.Windows.Forms.ComboBox();
this.GraphicsShadows2008 = new System.Windows.Forms.ComboBox();
this.label7 = new System.Windows.Forms.Label();
this.GraphicsShadows2007 = new System.Windows.Forms.CheckBox();
this.label8 = new System.Windows.Forms.Label();
this.ApplyButton = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.GraphicsLevel)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.GraphicsMeshQuality)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.GraphicsShadingQuality)).BeginInit();
this.SuspendLayout();
//
// label1
//
this.label1.Location = new System.Drawing.Point(12, 12);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(154, 30);
this.label1.TabIndex = 0;
this.label1.Text = "Quality Level (2010+) (0 means automatic)";
//
// GraphicsLevel
//
this.GraphicsLevel.Location = new System.Drawing.Point(172, 12);
this.GraphicsLevel.Maximum = new decimal(new int[] {
21,
0,
0,
0});
this.GraphicsLevel.Name = "GraphicsLevel";
this.GraphicsLevel.Size = new System.Drawing.Size(155, 20);
this.GraphicsLevel.TabIndex = 1;
this.GraphicsLevel.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.GraphicsLevel.ValueChanged += new System.EventHandler(this.GraphicsLevel_ValueChanged);
//
// GraphicsMeshQuality
//
this.GraphicsMeshQuality.Location = new System.Drawing.Point(172, 38);
this.GraphicsMeshQuality.Name = "GraphicsMeshQuality";
this.GraphicsMeshQuality.Size = new System.Drawing.Size(155, 20);
this.GraphicsMeshQuality.TabIndex = 2;
this.GraphicsMeshQuality.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.GraphicsMeshQuality.Value = new decimal(new int[] {
100,
0,
0,
0});
this.GraphicsMeshQuality.ValueChanged += new System.EventHandler(this.GraphicsMeshQuality_ValueChanged);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(12, 42);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(128, 13);
this.label2.TabIndex = 3;
this.label2.Text = "Mesh Quality (2007-2009)";
//
// GraphicsShadingQuality
//
this.GraphicsShadingQuality.Location = new System.Drawing.Point(172, 64);
this.GraphicsShadingQuality.Name = "GraphicsShadingQuality";
this.GraphicsShadingQuality.Size = new System.Drawing.Size(155, 20);
this.GraphicsShadingQuality.TabIndex = 4;
this.GraphicsShadingQuality.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.GraphicsShadingQuality.Value = new decimal(new int[] {
100,
0,
0,
0});
this.GraphicsShadingQuality.ValueChanged += new System.EventHandler(this.GraphicsShadingQuality_ValueChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(12, 66);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(141, 13);
this.label3.TabIndex = 5;
this.label3.Text = "Shading Quality (2007-2009)";
//
// GraphicsMaterialQuality
//
this.GraphicsMaterialQuality.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.GraphicsMaterialQuality.FormattingEnabled = true;
this.GraphicsMaterialQuality.Items.AddRange(new object[] {
"Automatic",
"Low",
"Medium",
"High"});
this.GraphicsMaterialQuality.Location = new System.Drawing.Point(172, 90);
this.GraphicsMaterialQuality.Name = "GraphicsMaterialQuality";
this.GraphicsMaterialQuality.Size = new System.Drawing.Size(155, 21);
this.GraphicsMaterialQuality.TabIndex = 6;
this.GraphicsMaterialQuality.SelectedIndexChanged += new System.EventHandler(this.GraphicsMaterialQuality_SelectedIndexChanged);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(12, 93);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(118, 13);
this.label4.TabIndex = 7;
this.label4.Text = "Material Quality (2009+)";
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(12, 121);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(103, 13);
this.label5.TabIndex = 8;
this.label5.Text = "Anti-Aliasing (2008+)";
//
// GraphicsAntiAliasing
//
this.GraphicsAntiAliasing.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.GraphicsAntiAliasing.FormattingEnabled = true;
this.GraphicsAntiAliasing.Items.AddRange(new object[] {
"Automatic",
"On",
"Off"});
this.GraphicsAntiAliasing.Location = new System.Drawing.Point(172, 117);
this.GraphicsAntiAliasing.Name = "GraphicsAntiAliasing";
this.GraphicsAntiAliasing.Size = new System.Drawing.Size(155, 21);
this.GraphicsAntiAliasing.TabIndex = 9;
this.GraphicsAntiAliasing.SelectedIndexChanged += new System.EventHandler(this.GraphicsAntiAliasing_SelectedIndexChanged);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(12, 148);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(107, 13);
this.label6.TabIndex = 10;
this.label6.Text = "Anti-Aliasing Samples";
//
// GraphicsAASamples
//
this.GraphicsAASamples.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.GraphicsAASamples.FormattingEnabled = true;
this.GraphicsAASamples.Items.AddRange(new object[] {
"None",
"4x",
"8x"});
this.GraphicsAASamples.Location = new System.Drawing.Point(172, 145);
this.GraphicsAASamples.Name = "GraphicsAASamples";
this.GraphicsAASamples.Size = new System.Drawing.Size(155, 21);
this.GraphicsAASamples.TabIndex = 11;
this.GraphicsAASamples.SelectedIndexChanged += new System.EventHandler(this.GraphicsAASamples_SelectedIndexChanged);
//
// GraphicsBevels
//
this.GraphicsBevels.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.GraphicsBevels.FormattingEnabled = true;
this.GraphicsBevels.Items.AddRange(new object[] {
"Automatic",
"On",
"Off"});
this.GraphicsBevels.Location = new System.Drawing.Point(172, 172);
this.GraphicsBevels.Name = "GraphicsBevels";
this.GraphicsBevels.Size = new System.Drawing.Size(155, 21);
this.GraphicsBevels.TabIndex = 12;
this.GraphicsBevels.SelectedIndexChanged += new System.EventHandler(this.GraphicsBevels_SelectedIndexChanged);
//
// GraphicsShadows2008
//
this.GraphicsShadows2008.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.GraphicsShadows2008.FormattingEnabled = true;
this.GraphicsShadows2008.Items.AddRange(new object[] {
"Automatic",
"On",
"Off",
"Character-Only"});
this.GraphicsShadows2008.Location = new System.Drawing.Point(172, 199);
this.GraphicsShadows2008.Name = "GraphicsShadows2008";
this.GraphicsShadows2008.Size = new System.Drawing.Size(155, 21);
this.GraphicsShadows2008.TabIndex = 13;
this.GraphicsShadows2008.SelectedIndexChanged += new System.EventHandler(this.GraphicsShadows2008_SelectedIndexChanged);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(12, 175);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(78, 13);
this.label7.TabIndex = 14;
this.label7.Text = "Bevels (2008+)";
//
// GraphicsShadows2007
//
this.GraphicsShadows2007.AutoSize = true;
this.GraphicsShadows2007.Location = new System.Drawing.Point(113, 226);
this.GraphicsShadows2007.Name = "GraphicsShadows2007";
this.GraphicsShadows2007.Size = new System.Drawing.Size(103, 17);
this.GraphicsShadows2007.TabIndex = 15;
this.GraphicsShadows2007.Text = "Shadows (2007)";
this.GraphicsShadows2007.UseVisualStyleBackColor = true;
this.GraphicsShadows2007.CheckedChanged += new System.EventHandler(this.GraphicsShadows2007_CheckedChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(12, 202);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(90, 13);
this.label8.TabIndex = 16;
this.label8.Text = "Shadows (2008+)";
//
// ApplyButton
//
this.ApplyButton.Location = new System.Drawing.Point(113, 249);
this.ApplyButton.Name = "ApplyButton";
this.ApplyButton.Size = new System.Drawing.Size(103, 23);
this.ApplyButton.TabIndex = 17;
this.ApplyButton.Text = "Apply";
this.ApplyButton.UseVisualStyleBackColor = true;
this.ApplyButton.Click += new System.EventHandler(this.ApplyButton_Click);
//
// CustomGraphicsOptions
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(339, 278);
this.Controls.Add(this.ApplyButton);
this.Controls.Add(this.label8);
this.Controls.Add(this.GraphicsShadows2007);
this.Controls.Add(this.label7);
this.Controls.Add(this.GraphicsShadows2008);
this.Controls.Add(this.GraphicsBevels);
this.Controls.Add(this.GraphicsAASamples);
this.Controls.Add(this.label6);
this.Controls.Add(this.GraphicsAntiAliasing);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.GraphicsMaterialQuality);
this.Controls.Add(this.label3);
this.Controls.Add(this.GraphicsShadingQuality);
this.Controls.Add(this.label2);
this.Controls.Add(this.GraphicsMeshQuality);
this.Controls.Add(this.GraphicsLevel);
this.Controls.Add(this.label1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "CustomGraphicsOptions";
this.Text = "Novetus Settings";
this.Load += new System.EventHandler(this.CustomGraphicsOptions_Load);
((System.ComponentModel.ISupportInitialize)(this.GraphicsLevel)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.GraphicsMeshQuality)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.GraphicsShadingQuality)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label label1;
private System.Windows.Forms.NumericUpDown GraphicsLevel;
private System.Windows.Forms.NumericUpDown GraphicsMeshQuality;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.NumericUpDown GraphicsShadingQuality;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.ComboBox GraphicsMaterialQuality;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox GraphicsAntiAliasing;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.ComboBox GraphicsAASamples;
private System.Windows.Forms.ComboBox GraphicsBevels;
private System.Windows.Forms.ComboBox GraphicsShadows2008;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.CheckBox GraphicsShadows2007;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.Button ApplyButton;
}
}

View File

@ -0,0 +1,278 @@
using System;
using System.IO;
using System.Windows.Forms;
using System.Xml.Linq;
namespace NovetusLauncher
{
public partial class CustomGraphicsOptions : Form
{
private int QualityLevel = 0;
private int MeshDetail = 100;
private int ShadingQuality = 100;
private int MaterialQuality = 0;
private int AA = 0;
private int AASamples = 1;
private int Bevels = 0;
private int Shadows_2008 = 0;
private bool Shadows_2007 = false;
private static string ClientName = "";
private FileFormat.ClientInfo info;
public CustomGraphicsOptions()
{
InitializeComponent();
}
private void CustomGraphicsOptions_Load(object sender, EventArgs e)
{
ClientName = GlobalVars.UserConfiguration.SelectedClient;
info = GlobalFuncs.GetClientInfoValues(ClientName);
string terms = "_" + ClientName;
string[] dirs = Directory.GetFiles(GlobalPaths.ConfigDirClients);
foreach (string dir in dirs)
{
if (dir.Contains(terms) && !dir.Contains("_default"))
{
string oldfile = "";
string fixedfile = "";
XDocument doc = null;
try
{
oldfile = File.ReadAllText(dir);
fixedfile = RobloxXML.RemoveInvalidXmlChars(RobloxXML.ReplaceHexadecimalSymbols(oldfile));
doc = XDocument.Parse(fixedfile);
}
catch (Exception)
{
return;
}
//read a few handpicked things to not take up memory
try
{
MeshDetail = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "maxMeshDetail", XMLTypes.Float));
GraphicsMeshQuality.Value = MeshDetail;
}
catch (Exception)
{
GraphicsMeshQuality.Enabled = false;
}
try
{
ShadingQuality = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "maxShadingQuality", XMLTypes.Float));
GraphicsShadingQuality.Value = ShadingQuality;
}
catch (Exception)
{
GraphicsShadingQuality.Enabled = false;
}
try
{
MaterialQuality = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "WoodQuality", XMLTypes.Token));
GraphicsMaterialQuality.SelectedIndex = MaterialQuality;
}
catch (Exception)
{
try
{
MaterialQuality = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "TrussDetail", XMLTypes.Token));
GraphicsMaterialQuality.SelectedIndex = MaterialQuality;
}
catch (Exception)
{
GraphicsMaterialQuality.Enabled = false;
}
}
try
{
AA = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "Antialiasing", XMLTypes.Token));
GraphicsAntiAliasing.SelectedIndex = AA;
}
catch (Exception)
{
GraphicsAntiAliasing.Enabled = false;
}
try
{
AASamples = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "AASamples", XMLTypes.Token));
switch (AASamples)
{
case 4:
GraphicsAASamples.SelectedIndex = 1;
break;
case 8:
GraphicsAASamples.SelectedIndex = 2;
break;
default:
GraphicsAASamples.SelectedIndex = 0;
break;
}
}
catch (Exception)
{
GraphicsAASamples.Enabled = false;
}
try
{
Bevels = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "Bevels", XMLTypes.Token));
GraphicsBevels.SelectedIndex = Bevels;
}
catch (Exception)
{
GraphicsBevels.Enabled = false;
}
try
{
Shadows_2008 = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "Shadow", XMLTypes.Token));
GraphicsShadows2008.SelectedIndex = Shadows_2008;
}
catch (Exception)
{
GraphicsShadows2008.Enabled = false;
}
try
{
Shadows_2007 = Convert.ToBoolean(RobloxXML.GetRenderSettings(doc, "Shadows", XMLTypes.Bool));
GraphicsShadows2007.Checked = Shadows_2007;
}
catch (Exception)
{
GraphicsShadows2007.Enabled = false;
}
try
{
QualityLevel = Convert.ToInt32(RobloxXML.GetRenderSettings(doc, "QualityLevel", XMLTypes.Token));
GraphicsLevel.Value = QualityLevel;
}
catch (Exception)
{
GraphicsLevel.Enabled = false;
}
doc = null;
GC.Collect();
GC.WaitForPendingFinalizers();
}
}
}
private void GraphicsLevel_ValueChanged(object sender, EventArgs e)
{
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21))
{
GraphicsLevel.Value = 19;
}
QualityLevel = Convert.ToInt32(GraphicsLevel.Value);
}
private void GraphicsLevel_Click(object sender, EventArgs e)
{
if (GraphicsLevel.Value > 19 && (info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_ForceAutomaticQL21 ||
info.ClientLoadOptions != Settings.GraphicsOptions.ClientLoadOptions.Client_2008AndUp_QualityLevel21))
{
MessageBox.Show("This client does not support quality levels above 19.");
}
}
private void GraphicsMeshQuality_ValueChanged(object sender, EventArgs e)
{
MeshDetail = Convert.ToInt32(GraphicsMeshQuality.Value);
}
private void GraphicsShadingQuality_ValueChanged(object sender, EventArgs e)
{
ShadingQuality = Convert.ToInt32(GraphicsShadingQuality.Value);
}
private void GraphicsMaterialQuality_SelectedIndexChanged(object sender, EventArgs e)
{
if (!GraphicsMaterialQuality.Enabled)
{
GraphicsAntiAliasing.SelectedIndex = 0;
}
MaterialQuality = GraphicsMaterialQuality.SelectedIndex;
}
private void GraphicsAntiAliasing_SelectedIndexChanged(object sender, EventArgs e)
{
if (!GraphicsAntiAliasing.Enabled)
{
GraphicsAntiAliasing.SelectedIndex = 0;
}
AA = GraphicsAntiAliasing.SelectedIndex;
}
private void GraphicsAASamples_SelectedIndexChanged(object sender, EventArgs e)
{
switch (GraphicsAASamples.SelectedIndex)
{
case 1:
AASamples = 4;
break;
case 2:
AASamples = 8;
break;
default:
AASamples = 1;
break;
}
}
private void GraphicsBevels_SelectedIndexChanged(object sender, EventArgs e)
{
if (!GraphicsBevels.Enabled)
{
GraphicsBevels.SelectedIndex = 0;
}
Bevels = GraphicsBevels.SelectedIndex;
}
private void GraphicsShadows2008_SelectedIndexChanged(object sender, EventArgs e)
{
if (!GraphicsShadows2008.Enabled)
{
GraphicsShadows2008.SelectedIndex = 0;
}
Shadows_2008 = GraphicsShadows2008.SelectedIndex;
}
private void GraphicsShadows2007_CheckedChanged(object sender, EventArgs e)
{
if (!GraphicsShadows2007.Enabled)
{
GraphicsShadows2007.Checked = false;
}
Shadows_2007 = GraphicsShadows2007.Checked;
}
private void ApplyButton_Click(object sender, EventArgs e)
{
GlobalFuncs.ReadClientValues(ClientName, null);
GlobalFuncs.ApplyClientSettings_custom(info, ClientName, MeshDetail, ShadingQuality, MaterialQuality,
AA, AASamples, Bevels, Shadows_2008, Shadows_2007, QualityLevel);
MessageBox.Show("Custom settings applied!");
Close();
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -769,30 +769,21 @@ namespace NovetusLauncher
void ResetConfigValues()
{
bool open = false;
//https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp
List<Form> openForms = new List<Form>();
FormCollection fc = Application.OpenForms;
foreach (Form f in Application.OpenForms)
openForms.Add(f);
foreach (Form frm in fc)
foreach (Form f in openForms)
{
//iterate through
if (frm.Name == "CharacterCustomizationCompact")
{
open = true;
frm.Close();
break;
}
if (f.Name != "LauncherFormCompact")
f.Close();
}
GlobalFuncs.ResetConfigValues(true);
WriteConfigValues();
ReadConfigValues();
if (open)
{
CharacterCustomizationCompact ccustom = new CharacterCustomizationCompact();
ccustom.Show();
}
}
void StartClient()
@ -1293,7 +1284,6 @@ namespace NovetusLauncher
#region Functions
private void SearchNodes(string SearchText, TreeNode StartNode)
{
TreeNode node;
while (StartNode != null)
{
if (StartNode.Text.ToLower().Contains(SearchText.ToLower()))

View File

@ -29,7 +29,6 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(LauncherFormCompactSettings));
this.label3 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label31 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
@ -37,21 +36,9 @@
this.checkBox7 = new System.Windows.Forms.CheckBox();
this.label22 = new System.Windows.Forms.Label();
this.checkBox5 = new System.Windows.Forms.CheckBox();
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// label3
//
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(12, 60);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(246, 82);
this.label3.TabIndex = 82;
this.label3.Text = "NOTE: Some video settings may require multiple client restarts or may require man" +
"ual application by opening the Tools>Settings dialog in Studio and then closing " +
"it.";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -62,7 +49,8 @@
"Low",
"Medium",
"High",
"Ultra"});
"Ultra",
"Custom"});
this.comboBox2.Location = new System.Drawing.Point(129, 38);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(84, 21);
@ -94,7 +82,7 @@
//
// checkBox6
//
this.checkBox6.Location = new System.Drawing.Point(63, 179);
this.checkBox6.Location = new System.Drawing.Point(68, 128);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(131, 16);
this.checkBox6.TabIndex = 76;
@ -105,7 +93,7 @@
// checkBox7
//
this.checkBox7.AutoSize = true;
this.checkBox7.Location = new System.Drawing.Point(63, 162);
this.checkBox7.Location = new System.Drawing.Point(68, 111);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(164, 17);
this.checkBox7.TabIndex = 77;
@ -127,7 +115,7 @@
this.checkBox5.AutoSize = true;
this.checkBox5.Checked = true;
this.checkBox5.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox5.Location = new System.Drawing.Point(63, 145);
this.checkBox5.Location = new System.Drawing.Point(68, 94);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(107, 17);
this.checkBox5.TabIndex = 75;
@ -135,13 +123,23 @@
this.checkBox5.UseVisualStyleBackColor = true;
this.checkBox5.CheckedChanged += new System.EventHandler(this.checkBox5_CheckedChanged);
//
// NovetusSettings
// button1
//
this.button1.Location = new System.Drawing.Point(12, 65);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(246, 23);
this.button1.TabIndex = 83;
this.button1.Text = "Change custom graphics options";
this.button1.UseVisualStyleBackColor = true;
this.button1.Click += new System.EventHandler(this.button1_Click);
//
// LauncherFormCompactSettings
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.ClientSize = new System.Drawing.Size(270, 202);
this.Controls.Add(this.label3);
this.ClientSize = new System.Drawing.Size(270, 151);
this.Controls.Add(this.button1);
this.Controls.Add(this.comboBox2);
this.Controls.Add(this.label31);
this.Controls.Add(this.comboBox1);
@ -151,7 +149,7 @@
this.Controls.Add(this.checkBox5);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Name = "NovetusSettings";
this.Name = "LauncherFormCompactSettings";
this.Text = "Novetus Settings";
this.Load += new System.EventHandler(this.NovetusSettings_Load);
this.ResumeLayout(false);
@ -159,9 +157,12 @@
}
#endregion
private void ComboBox2_Click(object sender, System.EventArgs e)
{
throw new System.NotImplementedException();
}
private System.Windows.Forms.Label label3;
#endregion
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.ComboBox comboBox1;
@ -169,5 +170,6 @@
private System.Windows.Forms.CheckBox checkBox7;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.CheckBox checkBox5;
private System.Windows.Forms.Button button1;
}
}

View File

@ -47,6 +47,9 @@ namespace NovetusLauncher
case Settings.GraphicsOptions.Level.Ultra:
comboBox2.SelectedIndex = 5;
break;
case Settings.GraphicsOptions.Level.Custom:
comboBox2.SelectedIndex = 6;
break;
default:
comboBox2.SelectedIndex = 0;
break;
@ -73,10 +76,10 @@ namespace NovetusLauncher
switch (comboBox1.SelectedIndex)
{
case 1:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
break;
case 2:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
break;
default:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.Automatic;
@ -103,6 +106,9 @@ namespace NovetusLauncher
case 5:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Ultra;
break;
case 6:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Custom;
break;
default:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Automatic;
break;
@ -120,5 +126,18 @@ namespace NovetusLauncher
Close();
}
}
private void button1_Click(object sender, EventArgs e)
{
if (comboBox2.SelectedIndex == 6)
{
CustomGraphicsOptions opt = new CustomGraphicsOptions();
opt.Show();
}
else
{
MessageBox.Show("You do not have the 'Custom' option selected. Please select it before continuing.");
}
}
}
}

View File

@ -70,11 +70,6 @@ namespace NovetusLauncher
this.button28 = new System.Windows.Forms.Button();
this.button34 = new System.Windows.Forms.Button();
this.panel2 = new System.Windows.Forms.Panel();
this.SettingsButton = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.button35 = new System.Windows.Forms.Button();
this.UAButton = new System.Windows.Forms.Button();
this.tabControl1 = new TabControlWithoutHeader();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.label24 = new System.Windows.Forms.Label();
@ -136,7 +131,6 @@ namespace NovetusLauncher
this.panel5 = new System.Windows.Forms.Panel();
this.label5 = new System.Windows.Forms.Label();
this.comboBox3 = new System.Windows.Forms.ComboBox();
this.label3 = new System.Windows.Forms.Label();
this.comboBox2 = new System.Windows.Forms.ComboBox();
this.label31 = new System.Windows.Forms.Label();
this.comboBox1 = new System.Windows.Forms.ComboBox();
@ -155,11 +149,15 @@ namespace NovetusLauncher
this.label18 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.label7 = new System.Windows.Forms.Label();
this.SettingsButton = new System.Windows.Forms.Button();
this.panel3 = new System.Windows.Forms.Panel();
this.panel4 = new System.Windows.Forms.Panel();
this.button35 = new System.Windows.Forms.Button();
this.UAButton = new System.Windows.Forms.Button();
this.button36 = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
this.panel1.SuspendLayout();
this.panel2.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.numericUpDown1)).BeginInit();
@ -173,6 +171,8 @@ namespace NovetusLauncher
this.tabPage8.SuspendLayout();
this.tabPage5.SuspendLayout();
this.panel5.SuspendLayout();
this.panel3.SuspendLayout();
this.panel4.SuspendLayout();
this.SuspendLayout();
//
// button25
@ -463,61 +463,6 @@ namespace NovetusLauncher
this.panel2.Size = new System.Drawing.Size(646, 311);
this.panel2.TabIndex = 61;
//
// SettingsButton
//
this.SettingsButton.Location = new System.Drawing.Point(0, 0);
this.SettingsButton.Name = "SettingsButton";
this.SettingsButton.Size = new System.Drawing.Size(75, 23);
this.SettingsButton.TabIndex = 0;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel3.Controls.Add(this.pictureBox2);
this.panel3.Controls.Add(this.textBox2);
this.panel3.Controls.Add(this.textBox5);
this.panel3.Controls.Add(this.button4);
this.panel3.Controls.Add(this.label16);
this.panel3.Controls.Add(this.label15);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label13);
this.panel3.Location = new System.Drawing.Point(1, 4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(229, 69);
this.panel3.TabIndex = 62;
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel4.Controls.Add(this.button35);
this.panel4.Controls.Add(this.button34);
this.panel4.Controls.Add(this.button21);
this.panel4.Controls.Add(this.button8);
this.panel4.Controls.Add(this.button3);
this.panel4.Controls.Add(this.button25);
this.panel4.Location = new System.Drawing.Point(236, 41);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(501, 32);
this.panel4.TabIndex = 63;
//
// button35
//
this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button35.Location = new System.Drawing.Point(113, 3);
this.button35.Name = "button35";
this.button35.Size = new System.Drawing.Size(41, 20);
this.button35.TabIndex = 61;
this.button35.Text = "Studio";
this.button35.UseVisualStyleBackColor = true;
this.button35.Click += new System.EventHandler(this.button35_Click);
//
// UAButton
//
this.UAButton.Location = new System.Drawing.Point(0, 0);
this.UAButton.Name = "UAButton";
this.UAButton.Size = new System.Drawing.Size(75, 23);
this.UAButton.TabIndex = 0;
//
// tabControl1
//
this.tabControl1.Alignment = System.Windows.Forms.TabAlignment.Bottom;
@ -1196,9 +1141,9 @@ namespace NovetusLauncher
//
// panel5
//
this.panel5.Controls.Add(this.button36);
this.panel5.Controls.Add(this.label5);
this.panel5.Controls.Add(this.comboBox3);
this.panel5.Controls.Add(this.label3);
this.panel5.Controls.Add(this.comboBox2);
this.panel5.Controls.Add(this.label31);
this.panel5.Controls.Add(this.comboBox1);
@ -1239,19 +1184,6 @@ namespace NovetusLauncher
this.comboBox3.TabIndex = 75;
this.comboBox3.SelectedIndexChanged += new System.EventHandler(this.comboBox3_SelectedIndexChanged);
//
// label3
//
this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 6F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.label3.ForeColor = System.Drawing.Color.Red;
this.label3.Location = new System.Drawing.Point(3, 158);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(191, 45);
this.label3.TabIndex = 74;
this.label3.Text = "NOTE: Some video settings may require multiple client restarts or may require man" +
"ual application by opening the Tools>Settings dialog in Studio and then closing " +
"it.";
this.label3.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// comboBox2
//
this.comboBox2.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@ -1262,7 +1194,8 @@ namespace NovetusLauncher
"Low",
"Medium",
"High",
"Ultra"});
"Ultra",
"Custom"});
this.comboBox2.Location = new System.Drawing.Point(90, 134);
this.comboBox2.Name = "comboBox2";
this.comboBox2.Size = new System.Drawing.Size(103, 21);
@ -1308,7 +1241,7 @@ namespace NovetusLauncher
//
// checkBox6
//
this.checkBox6.Location = new System.Drawing.Point(3, 240);
this.checkBox6.Location = new System.Drawing.Point(3, 224);
this.checkBox6.Name = "checkBox6";
this.checkBox6.Size = new System.Drawing.Size(131, 16);
this.checkBox6.TabIndex = 63;
@ -1319,7 +1252,7 @@ namespace NovetusLauncher
// checkBox7
//
this.checkBox7.AutoSize = true;
this.checkBox7.Location = new System.Drawing.Point(3, 223);
this.checkBox7.Location = new System.Drawing.Point(3, 207);
this.checkBox7.Name = "checkBox7";
this.checkBox7.Size = new System.Drawing.Size(164, 17);
this.checkBox7.TabIndex = 64;
@ -1341,7 +1274,7 @@ namespace NovetusLauncher
this.checkBox5.AutoSize = true;
this.checkBox5.Checked = true;
this.checkBox5.CheckState = System.Windows.Forms.CheckState.Checked;
this.checkBox5.Location = new System.Drawing.Point(3, 206);
this.checkBox5.Location = new System.Drawing.Point(3, 190);
this.checkBox5.Name = "checkBox5";
this.checkBox5.Size = new System.Drawing.Size(107, 17);
this.checkBox5.TabIndex = 62;
@ -1452,6 +1385,71 @@ namespace NovetusLauncher
this.label7.Text = "PROJECT STARLIGHT";
this.label7.TextAlign = System.Drawing.ContentAlignment.TopCenter;
//
// SettingsButton
//
this.SettingsButton.Location = new System.Drawing.Point(0, 0);
this.SettingsButton.Name = "SettingsButton";
this.SettingsButton.Size = new System.Drawing.Size(75, 23);
this.SettingsButton.TabIndex = 0;
//
// panel3
//
this.panel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel3.Controls.Add(this.pictureBox2);
this.panel3.Controls.Add(this.textBox2);
this.panel3.Controls.Add(this.textBox5);
this.panel3.Controls.Add(this.button4);
this.panel3.Controls.Add(this.label16);
this.panel3.Controls.Add(this.label15);
this.panel3.Controls.Add(this.label12);
this.panel3.Controls.Add(this.label13);
this.panel3.Location = new System.Drawing.Point(1, 4);
this.panel3.Name = "panel3";
this.panel3.Size = new System.Drawing.Size(229, 69);
this.panel3.TabIndex = 62;
//
// panel4
//
this.panel4.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.panel4.Controls.Add(this.button35);
this.panel4.Controls.Add(this.button34);
this.panel4.Controls.Add(this.button21);
this.panel4.Controls.Add(this.button8);
this.panel4.Controls.Add(this.button3);
this.panel4.Controls.Add(this.button25);
this.panel4.Location = new System.Drawing.Point(236, 41);
this.panel4.Name = "panel4";
this.panel4.Size = new System.Drawing.Size(501, 32);
this.panel4.TabIndex = 63;
//
// button35
//
this.button35.Font = new System.Drawing.Font("Microsoft Sans Serif", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.button35.Location = new System.Drawing.Point(113, 3);
this.button35.Name = "button35";
this.button35.Size = new System.Drawing.Size(41, 20);
this.button35.TabIndex = 61;
this.button35.Text = "Studio";
this.button35.UseVisualStyleBackColor = true;
this.button35.Click += new System.EventHandler(this.button35_Click);
//
// UAButton
//
this.UAButton.Location = new System.Drawing.Point(0, 0);
this.UAButton.Name = "UAButton";
this.UAButton.Size = new System.Drawing.Size(75, 23);
this.UAButton.TabIndex = 0;
//
// button36
//
this.button36.Location = new System.Drawing.Point(3, 161);
this.button36.Name = "button36";
this.button36.Size = new System.Drawing.Size(190, 23);
this.button36.TabIndex = 77;
this.button36.Text = "Change custom graphics options";
this.button36.UseVisualStyleBackColor = true;
this.button36.Click += new System.EventHandler(this.button36_Click);
//
// LauncherFormExtended
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -1478,9 +1476,6 @@ namespace NovetusLauncher
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
this.panel1.ResumeLayout(false);
this.panel2.ResumeLayout(false);
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
@ -1499,6 +1494,9 @@ namespace NovetusLauncher
this.tabPage5.ResumeLayout(false);
this.panel5.ResumeLayout(false);
this.panel5.PerformLayout();
this.panel3.ResumeLayout(false);
this.panel3.PerformLayout();
this.panel4.ResumeLayout(false);
this.ResumeLayout(false);
}
@ -1612,11 +1610,11 @@ namespace NovetusLauncher
private System.Windows.Forms.ComboBox comboBox1;
private System.Windows.Forms.Label label31;
private System.Windows.Forms.ComboBox comboBox2;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.ComboBox comboBox3;
private System.Windows.Forms.TextBox SearchBar;
private System.Windows.Forms.Button SearchButton;
private System.Windows.Forms.Button button36;
//private System.Windows.Forms.CheckBox checkBox8;
}
}

View File

@ -524,6 +524,9 @@ namespace NovetusLauncher
case Settings.GraphicsOptions.Level.Ultra:
comboBox2.SelectedIndex = 5;
break;
case Settings.GraphicsOptions.Level.Custom:
comboBox2.SelectedIndex = 6;
break;
default:
comboBox2.SelectedIndex = 0;
break;
@ -657,7 +660,7 @@ namespace NovetusLauncher
ReadClientValues();
}
GlobalFuncs.UpdateRichPresence(GlobalVars.LauncherState.InLauncher, "");
}
}
void CheckBox3CheckedChanged(object sender, EventArgs e)
{
@ -808,33 +811,24 @@ namespace NovetusLauncher
}
}
}
void ResetConfigValues()
{
bool open = false;
//https://stackoverflow.com/questions/9029351/close-all-open-forms-except-the-main-menu-in-c-sharp
List<Form> openForms = new List<Form>();
FormCollection fc = Application.OpenForms;
foreach (Form f in Application.OpenForms)
openForms.Add(f);
foreach (Form frm in fc)
foreach (Form f in openForms)
{
//iterate through
if (frm.Name == "CharacterCustomizationExtended")
{
open = true;
frm.Close();
break;
}
if (f.Name != "LauncherFormExtended")
f.Close();
}
GlobalFuncs.ResetConfigValues();
WriteConfigValues();
ReadConfigValues();
if (open)
{
CharacterCustomizationExtended ccustom = new CharacterCustomizationExtended();
ccustom.Show();
}
}
void StartClient()
@ -1301,10 +1295,10 @@ namespace NovetusLauncher
switch (comboBox1.SelectedIndex)
{
case 1:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
break;
case 2:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
break;
default:
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.Automatic;
@ -1333,6 +1327,9 @@ namespace NovetusLauncher
case 5:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Ultra;
break;
case 6:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Custom;
break;
default:
GlobalVars.UserConfiguration.QualityLevel = Settings.GraphicsOptions.Level.Automatic;
break;
@ -1396,12 +1393,24 @@ namespace NovetusLauncher
treeView1.Select();
}
}
private void button36_Click(object sender, EventArgs e)
{
if (comboBox2.SelectedIndex == 6)
{
CustomGraphicsOptions opt = new CustomGraphicsOptions();
opt.Show();
}
else
{
MessageBox.Show("You do not have the 'Custom' option selected. Please select it before continuing.");
}
}
#endregion
#region Functions
private void SearchNodes(string SearchText, TreeNode StartNode)
{
TreeNode node;
while (StartNode != null)
{
if (StartNode.Text.ToLower().Contains(SearchText.ToLower()))
@ -1416,7 +1425,7 @@ namespace NovetusLauncher
};
}
#endregion
#endregion
}
#endregion
}

View File

@ -215,6 +215,12 @@
<Compile Include="Classes\Launcher\AddonLoader.cs" />
<Compile Include="Classes\Launcher\SplashLoader.cs" />
<Compile Include="Classes\LocalVars.cs" />
<Compile Include="Forms\CustomGraphicsOptions.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Forms\CustomGraphicsOptions.Designer.cs">
<DependentUpon>CustomGraphicsOptions.cs</DependentUpon>
</Compile>
<Compile Include="Forms\LauncherForm\Compact\LauncherFormCompact.cs">
<SubType>Form</SubType>
</Compile>
@ -282,6 +288,9 @@
<Link>Forms\SDK\SplashTester.resx</Link>
<DependentUpon>SplashTester.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\CustomGraphicsOptions.resx">
<DependentUpon>CustomGraphicsOptions.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Forms\LauncherForm\Compact\LauncherFormCompact.resx">
<DependentUpon>LauncherFormCompact.cs</DependentUpon>
</EmbeddedResource>