public Config(OldConfig oldConfig) { Version = 2; TweakVersion = "0.0.0"; SilenceUpdates = false; ConfigX = oldConfig.ConfigX; ConfigY = oldConfig.ConfigY; ConfigKeyBind = new KeyBind { Key = KeyCode.F6, Ctrl = true, Alt = false, Shift = true }; Enabled = oldConfig.Enabled; EnabledKeyBind = new KeyBind { Key = KeyCode.F6, Ctrl = false, Alt = false, Shift = false }; FC = oldConfig.FC; NotesMissed = oldConfig.NotesMissed; FailDelay = oldConfig.FailDelay; DisplayImage = new ColorablePositionableLabel { Visible = oldConfig.DisplayImage, X = (int)oldConfig.DisplayImageX, Y = (int)oldConfig.DisplayImageY, Size = oldConfig.DisplayImageScale, Bold = oldConfig.DisplayImageBold, Italic = oldConfig.DisplayImageItalic, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(oldConfig.DisplayImageColorARGB) }; RemainingNotesLeft = new ColorablePositionableLabel { Visible = oldConfig.RemainingNotesLeft, X = (int)oldConfig.RemainingNotesLeftX, Y = (int)oldConfig.RemainingNotesLeftY, Size = oldConfig.RemainingNotesLeftScale, Bold = oldConfig.RemainingNotesLeftBold, Italic = oldConfig.RemainingNotesLeftItalic, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(oldConfig.RemainingNotesLeftColorARGB) }; RestartIndicator = new ColorablePositionableLabel { Visible = true, X = Screen.width / 2, Y = (int)(1360.0f * Screen.height / 1440.0f), Size = Screen.height * 50 / 1440, Bold = true, Italic = false, Alignment = TextAnchor.MiddleCenter, Color = new ColorARGB(Color.white) }; }
public Config() { Version = 2; TweakVersion = "0.0.0"; SilenceUpdates = false; ConfigX = 200.0f; ConfigY = 200.0f; ConfigKeyBind = new KeyBind { Key = KeyCode.F6, Ctrl = true, Alt = false, Shift = true }; Enabled = false; EnabledKeyBind = new KeyBind { Key = KeyCode.F6, Ctrl = false, Alt = false, Shift = false }; FC = true; NotesMissed = 0; FailDelay = 2.0f; DisplayImage = new ColorablePositionableLabel { Visible = true, X = (int)(30.0f * Screen.width / 1440.0f), Y = (int)(1415.0f * Screen.height / 1440.0f), Size = Screen.height * 50 / 1440, Bold = true, Italic = false, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(Color.white) }; RemainingNotesLeft = new ColorablePositionableLabel { Visible = true, X = (int)(30.0f * Screen.width / 1440.0f), Y = (int)(1365.0f * Screen.height / 1440.0f), Size = Screen.height * 40 / 1440, Bold = true, Italic = true, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(Color.white) }; RestartIndicator = new ColorablePositionableLabel { Visible = true, X = Screen.width / 2, Y = (int)(1200.0f * Screen.height / 1440.0f), Size = Screen.height * 50 / 1440, Bold = true, Italic = false, Alignment = TextAnchor.MiddleCenter, Color = new ColorARGB(Color.white) }; }
public Config() { Version = 1; TweakVersion = "0.0.0"; SilenceUpdates = false; ConfigX = 300.0f; ConfigY = 200.0f; ConfigKeyBind = new KeyBind { Key = KeyCode.F8, Ctrl = true, Alt = false, Shift = true }; NoteStreakEnabled = true; HotStartEnabled = true; StarPowerActiveEnabled = true; Indicator = new ColorablePositionableLabel { Visible = true, X = 0, Y = 0, Size = 100, Bold = true, Italic = false, Alignment = TextAnchor.MiddleCenter, Color = new ColorARGB(Color.white) }; }
public Config() { Version = 1; TweakVersion = "3.1.0"; SilenceUpdates = false; ConfigX = 100.0f; ConfigY = 100.0f; ConfigKeyBind = new KeyBind { Key = KeyCode.F10, Ctrl = true, Alt = false, Shift = true }; Enabled = false; EnabledKeyBind = new KeyBind { Key = KeyCode.F10, Ctrl = false, Alt = false, Shift = false }; FontSize = 15; TwitchChannel = ""; ChatHeight = Screen.height; ChatWidth = Screen.width / 5; ChatX = Screen.width; ChatY = 0; UpdateSpeed = 1000.0f; DisplayImage = new ColorablePositionableLabel { Visible = true, X = (int)(30.0f * Screen.width / 1440.0f), Y = (int)(1415.0f * Screen.height / 1440.0f), Size = Screen.height * 50 / 1440, Bold = true, Italic = false, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(Color.white) }; }
public void ReloadConfig(string configPath) { var configFilePath = new FileInfo(configPath); if (configFilePath.Exists) { var configString = File.ReadAllText(configFilePath.FullName); var serializer = new XmlSerializer(typeof(Config)); using (var configIn = new MemoryStream(Encoding.Unicode.GetBytes(configString))) { var newConfig = serializer.Deserialize(configIn) as Config; ConfigKeyBind = newConfig.ConfigKeyBind; NoteStreakEnabled = newConfig.NoteStreakEnabled; HotStartEnabled = newConfig.HotStartEnabled; StarPowerActiveEnabled = newConfig.StarPowerActiveEnabled; Indicator = newConfig.Indicator; } } }
public Config() { Version = 1; TweakVersion = "1.0.0"; SilenceUpdates = false; PanSpeed = 1000; ConfigX = 100.0f; ConfigY = 100.0f; ConfigKeyBind = new KeyBind { Key = KeyCode.F11, Ctrl = true, Alt = false, Shift = true }; Enabled = true; EnabledKeyBind = new KeyBind { Key = KeyCode.F11, Ctrl = false, Alt = false, Shift = false }; DisplayImage = new ColorablePositionableLabel { Visible = true, X = (int)(30.0f * Screen.width / 1440.0f), Y = (int)(1415.0f * Screen.height / 1440.0f), Size = Screen.height * 50 / 1440, Bold = true, Italic = false, Alignment = TextAnchor.MiddleLeft, Color = new ColorARGB(Color.white) }; }
public void ReloadConfig(string configPath) { var configFilePath = new FileInfo(configPath); if (configFilePath.Exists) { var configString = File.ReadAllText(configFilePath.FullName); var serializer = new XmlSerializer(typeof(Config)); using (var configIn = new MemoryStream(Encoding.Unicode.GetBytes(configString))) { var newConfig = serializer.Deserialize(configIn) as Config; ConfigKeyBind = newConfig.ConfigKeyBind; Enabled = newConfig.Enabled; EnabledKeyBind = newConfig.EnabledKeyBind; FC = newConfig.FC; NotesMissed = newConfig.NotesMissed; FailDelay = newConfig.FailDelay; DisplayImage = newConfig.DisplayImage; RemainingNotesLeft = newConfig.RemainingNotesLeft; RestartIndicator = newConfig.RestartIndicator; } } }