added OpenGL experimental/stable as a graphics option. add autocomplete feature for names and ids
This commit is contained in:
parent
fdc005ab2a
commit
d750c2f08f
|
|
@ -13,8 +13,9 @@ public class Settings
|
||||||
public enum Mode
|
public enum Mode
|
||||||
{
|
{
|
||||||
Automatic = 0,
|
Automatic = 0,
|
||||||
OpenGL = 1,
|
OpenGLStable = 1,
|
||||||
DirectX = 2
|
OpenGLExperimental = 2,
|
||||||
|
DirectX = 3
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum Level
|
public enum Level
|
||||||
|
|
@ -46,8 +47,10 @@ public class Settings
|
||||||
switch (level)
|
switch (level)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
return Mode.OpenGL;
|
return Mode.OpenGLStable;
|
||||||
case 2:
|
case 2:
|
||||||
|
return Mode.OpenGLExperimental;
|
||||||
|
case 3:
|
||||||
return Mode.DirectX;
|
return Mode.DirectX;
|
||||||
default:
|
default:
|
||||||
return Mode.Automatic;
|
return Mode.Automatic;
|
||||||
|
|
@ -58,10 +61,12 @@ public class Settings
|
||||||
{
|
{
|
||||||
switch (level)
|
switch (level)
|
||||||
{
|
{
|
||||||
case Mode.OpenGL:
|
case Mode.OpenGLStable:
|
||||||
return 1;
|
return 1;
|
||||||
case Mode.DirectX:
|
case Mode.OpenGLExperimental:
|
||||||
return 2;
|
return 2;
|
||||||
|
case Mode.DirectX:
|
||||||
|
return 3;
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -911,7 +911,7 @@ public class GlobalFuncs
|
||||||
|
|
||||||
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.Mode.OpenGL:
|
case Settings.GraphicsOptions.Mode.OpenGLStable:
|
||||||
switch (info.ClientLoadOptions)
|
switch (info.ClientLoadOptions)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
||||||
|
|
@ -927,6 +927,9 @@ public class GlobalFuncs
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Settings.GraphicsOptions.Mode.OpenGLExperimental:
|
||||||
|
GraphicsMode = 4;
|
||||||
|
break;
|
||||||
case Settings.GraphicsOptions.Mode.DirectX:
|
case Settings.GraphicsOptions.Mode.DirectX:
|
||||||
GraphicsMode = 3;
|
GraphicsMode = 3;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1033,7 +1036,7 @@ public class GlobalFuncs
|
||||||
|
|
||||||
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.Mode.OpenGL:
|
case Settings.GraphicsOptions.Mode.OpenGLStable:
|
||||||
switch (info.ClientLoadOptions)
|
switch (info.ClientLoadOptions)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
||||||
|
|
@ -1049,6 +1052,9 @@ public class GlobalFuncs
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Settings.GraphicsOptions.Mode.OpenGLExperimental:
|
||||||
|
GraphicsMode = 4;
|
||||||
|
break;
|
||||||
case Settings.GraphicsOptions.Mode.DirectX:
|
case Settings.GraphicsOptions.Mode.DirectX:
|
||||||
GraphicsMode = 3;
|
GraphicsMode = 3;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1103,7 +1109,7 @@ public class GlobalFuncs
|
||||||
{
|
{
|
||||||
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.Mode.OpenGL:
|
case Settings.GraphicsOptions.Mode.OpenGLStable:
|
||||||
switch (info.ClientLoadOptions)
|
switch (info.ClientLoadOptions)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
case Settings.GraphicsOptions.ClientLoadOptions.Client_2007:
|
||||||
|
|
@ -1119,6 +1125,9 @@ public class GlobalFuncs
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case Settings.GraphicsOptions.Mode.OpenGLExperimental:
|
||||||
|
GraphicsMode = 4;
|
||||||
|
break;
|
||||||
case Settings.GraphicsOptions.Mode.DirectX:
|
case Settings.GraphicsOptions.Mode.DirectX:
|
||||||
GraphicsMode = 3;
|
GraphicsMode = 3;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,130 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
#region Special Splash Definition
|
||||||
|
public class SpecialSplash
|
||||||
|
{
|
||||||
|
public SpecialSplash(string text)
|
||||||
|
{
|
||||||
|
if (text.Contains('|'))
|
||||||
|
{
|
||||||
|
string[] subs = text.Split('|');
|
||||||
|
SplashText = subs[0];
|
||||||
|
string date = subs[1];
|
||||||
|
if (date.Contains('/'))
|
||||||
|
{
|
||||||
|
if (date.Contains('-'))
|
||||||
|
{
|
||||||
|
string[] datesubs = date.Split('-');
|
||||||
|
SplashFirstAppearanceDate = ConvertStringToDate(datesubs[0]);
|
||||||
|
SplashEndAppearanceDate = ConvertStringToDate(datesubs[1]);
|
||||||
|
|
||||||
|
if (datesubs.ElementAtOrDefault(2) != null && datesubs.ElementAtOrDefault(3) != null)
|
||||||
|
{
|
||||||
|
SplashDateStopAppearingAllTheTime = ConvertStringToDate(datesubs[2]);
|
||||||
|
SplashDateStartToAppearLess = ConvertStringToDate(datesubs[3]);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SplashDateStopAppearingAllTheTime = null;
|
||||||
|
SplashDateStartToAppearLess = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SplashFirstAppearanceDate = ConvertStringToDate(date);
|
||||||
|
SplashEndAppearanceDate = null;
|
||||||
|
SplashDateStartToAppearLess = null;
|
||||||
|
SplashDateStopAppearingAllTheTime = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
SplashWeekday = null;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
SplashWeekday = ConvertStringToDayOfWeek(date);
|
||||||
|
SplashFirstAppearanceDate = null;
|
||||||
|
SplashEndAppearanceDate = null;
|
||||||
|
SplashDateStartToAppearLess = null;
|
||||||
|
SplashDateStopAppearingAllTheTime = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public DateTime ConvertStringToDate(string date)
|
||||||
|
{
|
||||||
|
if (date.Contains('/'))
|
||||||
|
{
|
||||||
|
string[] subs = date.Split('/');
|
||||||
|
return new DateTime(DateTime.Now.Year, Convert.ToInt32(subs[0]), Convert.ToInt32(subs[1]), CultureInfo.InvariantCulture.Calendar);
|
||||||
|
}
|
||||||
|
|
||||||
|
return DateTime.Now;
|
||||||
|
}
|
||||||
|
|
||||||
|
public DayOfWeek ConvertStringToDayOfWeek(string dayofweek)
|
||||||
|
{
|
||||||
|
DayOfWeek weekday = DayOfWeek.Sunday;
|
||||||
|
|
||||||
|
switch (dayofweek)
|
||||||
|
{
|
||||||
|
case string monday when string.Compare(monday, "monday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Monday;
|
||||||
|
break;
|
||||||
|
case string tuesday when string.Compare(tuesday, "tuesday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Tuesday;
|
||||||
|
break;
|
||||||
|
case string wednesday when string.Compare(wednesday, "wednesday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Wednesday;
|
||||||
|
break;
|
||||||
|
case string thursday when string.Compare(thursday, "thursday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Thursday;
|
||||||
|
break;
|
||||||
|
case string friday when string.Compare(friday, "friday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Friday;
|
||||||
|
break;
|
||||||
|
case string saturday when string.Compare(saturday, "saturday", true, CultureInfo.InvariantCulture) == 0:
|
||||||
|
weekday = DayOfWeek.Saturday;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return weekday;
|
||||||
|
}
|
||||||
|
|
||||||
|
//text
|
||||||
|
public string SplashText { get; set; }
|
||||||
|
//date we should start appearing
|
||||||
|
public DateTime? SplashFirstAppearanceDate { get; set; }
|
||||||
|
//date we should stop appearing
|
||||||
|
public DateTime? SplashEndAppearanceDate { get; set; }
|
||||||
|
public DateTime? SplashDateStopAppearingAllTheTime { get; set; }
|
||||||
|
public DateTime? SplashDateStartToAppearLess { get; set; }
|
||||||
|
//weekdays.
|
||||||
|
public DayOfWeek? SplashWeekday { get; set; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region Special Names Definition
|
||||||
|
public class SpecialName
|
||||||
|
{
|
||||||
|
public SpecialName(string text)
|
||||||
|
{
|
||||||
|
if (text.Contains('|'))
|
||||||
|
{
|
||||||
|
string[] subs = text.Split('|');
|
||||||
|
NameText = subs[0];
|
||||||
|
NameID = Convert.ToInt32(subs[1]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//text
|
||||||
|
public string NameText { get; set; }
|
||||||
|
//id
|
||||||
|
public int NameID { get; set; }
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
@ -5,112 +5,6 @@ using System.Globalization;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Special Splash Definition
|
|
||||||
public class SpecialSplash
|
|
||||||
{
|
|
||||||
public SpecialSplash(string text)
|
|
||||||
{
|
|
||||||
if (text.Contains('|'))
|
|
||||||
{
|
|
||||||
string[] subs = text.Split('|');
|
|
||||||
SplashText = subs[0];
|
|
||||||
string date = subs[1];
|
|
||||||
if (date.Contains('/'))
|
|
||||||
{
|
|
||||||
if (date.Contains('-'))
|
|
||||||
{
|
|
||||||
string[] datesubs = date.Split('-');
|
|
||||||
SplashFirstAppearanceDate = ConvertStringToDate(datesubs[0]);
|
|
||||||
SplashEndAppearanceDate = ConvertStringToDate(datesubs[1]);
|
|
||||||
|
|
||||||
if (datesubs.ElementAtOrDefault(2) != null && datesubs.ElementAtOrDefault(3) != null)
|
|
||||||
{
|
|
||||||
SplashDateStopAppearingAllTheTime = ConvertStringToDate(datesubs[2]);
|
|
||||||
SplashDateStartToAppearLess = ConvertStringToDate(datesubs[3]);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SplashDateStopAppearingAllTheTime = null;
|
|
||||||
SplashDateStartToAppearLess = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SplashFirstAppearanceDate = ConvertStringToDate(date);
|
|
||||||
SplashEndAppearanceDate = null;
|
|
||||||
SplashDateStartToAppearLess = null;
|
|
||||||
SplashDateStopAppearingAllTheTime = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
SplashWeekday = null;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
SplashWeekday = ConvertStringToDayOfWeek(date);
|
|
||||||
SplashFirstAppearanceDate = null;
|
|
||||||
SplashEndAppearanceDate = null;
|
|
||||||
SplashDateStartToAppearLess = null;
|
|
||||||
SplashDateStopAppearingAllTheTime = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public DateTime ConvertStringToDate(string date)
|
|
||||||
{
|
|
||||||
if (date.Contains('/'))
|
|
||||||
{
|
|
||||||
string[] subs = date.Split('/');
|
|
||||||
return new DateTime(DateTime.Now.Year, Convert.ToInt32(subs[0]), Convert.ToInt32(subs[1]), CultureInfo.InvariantCulture.Calendar);
|
|
||||||
}
|
|
||||||
|
|
||||||
return DateTime.Now;
|
|
||||||
}
|
|
||||||
|
|
||||||
public DayOfWeek ConvertStringToDayOfWeek(string dayofweek)
|
|
||||||
{
|
|
||||||
DayOfWeek weekday = DayOfWeek.Sunday;
|
|
||||||
|
|
||||||
switch (dayofweek)
|
|
||||||
{
|
|
||||||
case string monday when string.Compare(monday, "monday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Monday;
|
|
||||||
break;
|
|
||||||
case string tuesday when string.Compare(tuesday, "tuesday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Tuesday;
|
|
||||||
break;
|
|
||||||
case string wednesday when string.Compare(wednesday, "wednesday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Wednesday;
|
|
||||||
break;
|
|
||||||
case string thursday when string.Compare(thursday, "thursday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Thursday;
|
|
||||||
break;
|
|
||||||
case string friday when string.Compare(friday, "friday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Friday;
|
|
||||||
break;
|
|
||||||
case string saturday when string.Compare(saturday, "saturday", true, CultureInfo.InvariantCulture) == 0:
|
|
||||||
weekday = DayOfWeek.Saturday;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return weekday;
|
|
||||||
}
|
|
||||||
|
|
||||||
//text
|
|
||||||
public string SplashText { get; set; }
|
|
||||||
//date we should start appearing
|
|
||||||
public DateTime? SplashFirstAppearanceDate { get; set; }
|
|
||||||
//date we should stop appearing
|
|
||||||
public DateTime? SplashEndAppearanceDate { get; set; }
|
|
||||||
public DateTime? SplashDateStopAppearingAllTheTime { get; set; }
|
|
||||||
public DateTime? SplashDateStartToAppearLess { get; set; }
|
|
||||||
//weekdays.
|
|
||||||
public DayOfWeek? SplashWeekday { get; set; }
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region Splash Reader
|
#region Splash Reader
|
||||||
|
|
||||||
public static class SplashReader
|
public static class SplashReader
|
||||||
|
|
|
||||||
|
|
@ -4,9 +4,10 @@ namespace NovetusLauncher
|
||||||
#region LocalVars
|
#region LocalVars
|
||||||
class LocalVars
|
class LocalVars
|
||||||
{
|
{
|
||||||
#region Easter Egg Variables
|
#region Variables
|
||||||
public static int Clicks = 0;
|
public static int Clicks = 0;
|
||||||
public static string prevsplash = "";
|
public static string prevsplash = "";
|
||||||
|
public static bool launcherInitState = true;
|
||||||
#endregion
|
#endregion
|
||||||
#region Commands
|
#region Commands
|
||||||
public static string important = "";
|
public static string important = "";
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,7 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
void TextBox2TextChanged(object sender, EventArgs e)
|
void TextBox2TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GlobalVars.UserConfiguration.PlayerName = textBox2.Text;
|
launcherForm.ChangeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,8 @@
|
||||||
this.comboBox1.FormattingEnabled = true;
|
this.comboBox1.FormattingEnabled = true;
|
||||||
this.comboBox1.Items.AddRange(new object[] {
|
this.comboBox1.Items.AddRange(new object[] {
|
||||||
"Automatic",
|
"Automatic",
|
||||||
"OpenGL",
|
"GL Stable",
|
||||||
|
"GL Experimental",
|
||||||
"DirectX"});
|
"DirectX"});
|
||||||
this.comboBox1.Location = new System.Drawing.Point(123, 11);
|
this.comboBox1.Location = new System.Drawing.Point(123, 11);
|
||||||
this.comboBox1.Name = "comboBox1";
|
this.comboBox1.Name = "comboBox1";
|
||||||
|
|
|
||||||
|
|
@ -36,9 +36,12 @@ namespace NovetusLauncher
|
||||||
switch (comboBox1.SelectedIndex)
|
switch (comboBox1.SelectedIndex)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGLStable;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGLExperimental;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
@ -146,12 +149,15 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.Mode.OpenGL:
|
case Settings.GraphicsOptions.Mode.OpenGLStable:
|
||||||
comboBox1.SelectedIndex = 1;
|
comboBox1.SelectedIndex = 1;
|
||||||
break;
|
break;
|
||||||
case Settings.GraphicsOptions.Mode.DirectX:
|
case Settings.GraphicsOptions.Mode.OpenGLExperimental:
|
||||||
comboBox1.SelectedIndex = 2;
|
comboBox1.SelectedIndex = 2;
|
||||||
break;
|
break;
|
||||||
|
case Settings.GraphicsOptions.Mode.DirectX:
|
||||||
|
comboBox1.SelectedIndex = 3;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
comboBox1.SelectedIndex = 0;
|
comboBox1.SelectedIndex = 0;
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -1345,7 +1345,8 @@ namespace NovetusLauncher
|
||||||
this.comboBox1.FormattingEnabled = true;
|
this.comboBox1.FormattingEnabled = true;
|
||||||
this.comboBox1.Items.AddRange(new object[] {
|
this.comboBox1.Items.AddRange(new object[] {
|
||||||
"Automatic",
|
"Automatic",
|
||||||
"OpenGL",
|
"GL Stable",
|
||||||
|
"GL Experimental",
|
||||||
"DirectX"});
|
"DirectX"});
|
||||||
this.comboBox1.Location = new System.Drawing.Point(90, 108);
|
this.comboBox1.Location = new System.Drawing.Point(90, 108);
|
||||||
this.comboBox1.Name = "comboBox1";
|
this.comboBox1.Name = "comboBox1";
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ namespace NovetusLauncher
|
||||||
|
|
||||||
void TextBox2TextChanged(object sender, EventArgs e)
|
void TextBox2TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
GlobalVars.UserConfiguration.PlayerName = textBox2.Text;
|
launcherForm.ChangeName();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
void ListBox2SelectedIndexChanged(object sender, EventArgs e)
|
||||||
|
|
@ -320,9 +320,12 @@ namespace NovetusLauncher
|
||||||
switch (comboBox1.SelectedIndex)
|
switch (comboBox1.SelectedIndex)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGL;
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGLStable;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.OpenGLExperimental;
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
|
GlobalVars.UserConfiguration.GraphicsMode = Settings.GraphicsOptions.Mode.DirectX;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -239,6 +239,7 @@ namespace NovetusLauncher
|
||||||
ReadConfigValues(true);
|
ReadConfigValues(true);
|
||||||
InitUPnP();
|
InitUPnP();
|
||||||
StartDiscord();
|
StartDiscord();
|
||||||
|
LocalVars.launcherInitState = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void CloseEvent()
|
public void CloseEvent()
|
||||||
|
|
@ -700,12 +701,15 @@ namespace NovetusLauncher
|
||||||
{
|
{
|
||||||
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
switch (GlobalVars.UserConfiguration.GraphicsMode)
|
||||||
{
|
{
|
||||||
case Settings.GraphicsOptions.Mode.OpenGL:
|
case Settings.GraphicsOptions.Mode.OpenGLStable:
|
||||||
GraphicsModeBox.SelectedIndex = 1;
|
GraphicsModeBox.SelectedIndex = 1;
|
||||||
break;
|
break;
|
||||||
case Settings.GraphicsOptions.Mode.DirectX:
|
case Settings.GraphicsOptions.Mode.OpenGLExperimental:
|
||||||
GraphicsModeBox.SelectedIndex = 2;
|
GraphicsModeBox.SelectedIndex = 2;
|
||||||
break;
|
break;
|
||||||
|
case Settings.GraphicsOptions.Mode.DirectX:
|
||||||
|
GraphicsModeBox.SelectedIndex = 3;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GraphicsModeBox.SelectedIndex = 0;
|
GraphicsModeBox.SelectedIndex = 0;
|
||||||
break;
|
break;
|
||||||
|
|
@ -1090,6 +1094,39 @@ namespace NovetusLauncher
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static int GetSpecialNameID(string text)
|
||||||
|
{
|
||||||
|
string[] names = File.ReadAllLines(GlobalPaths.ConfigDir + "\\names-special.txt");
|
||||||
|
int returnname = 0;
|
||||||
|
List<SpecialName> specialnames = new List<SpecialName>();
|
||||||
|
|
||||||
|
foreach (var name in names)
|
||||||
|
{
|
||||||
|
specialnames.Add(new SpecialName(name));
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var specialname in specialnames)
|
||||||
|
{
|
||||||
|
if (specialname.NameText.Equals(text, StringComparison.InvariantCultureIgnoreCase))
|
||||||
|
{
|
||||||
|
returnname = specialname.NameID;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return returnname;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ChangeName()
|
||||||
|
{
|
||||||
|
GlobalVars.UserConfiguration.PlayerName = PlayerNameTextBox.Text;
|
||||||
|
int autoNameID = GetSpecialNameID(GlobalVars.UserConfiguration.PlayerName);
|
||||||
|
if (LocalVars.launcherInitState == false && autoNameID > 0)
|
||||||
|
{
|
||||||
|
PlayerIDTextBox.Text = autoNameID.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void ChangeUserID()
|
public void ChangeUserID()
|
||||||
{
|
{
|
||||||
int parsedValue;
|
int parsedValue;
|
||||||
|
|
|
||||||
|
|
@ -149,6 +149,7 @@
|
||||||
<DependentUpon>CharacterCustomizationExtended.cs</DependentUpon>
|
<DependentUpon>CharacterCustomizationExtended.cs</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Classes\Launcher\AddonLoader.cs" />
|
<Compile Include="Classes\Launcher\AddonLoader.cs" />
|
||||||
|
<Compile Include="Classes\Launcher\EasterEggs.cs" />
|
||||||
<Compile Include="Classes\Launcher\SplashLoader.cs" />
|
<Compile Include="Classes\Launcher\SplashLoader.cs" />
|
||||||
<Compile Include="Classes\LocalVars.cs" />
|
<Compile Include="Classes\LocalVars.cs" />
|
||||||
<Compile Include="Forms\CharCustom\CharacterCustomizationShared.cs" />
|
<Compile Include="Forms\CharCustom\CharacterCustomizationShared.cs" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue