From 47754db1fd881b752422044121bcae41f142e77e Mon Sep 17 00:00:00 2001 From: NtsFranz Date: Sun, 11 Apr 2021 20:22:54 -0400 Subject: [PATCH] moved some more stuff to resources, increased window size, switched livewindow link to follow setting, switched ignitebot links to spark links --- DiscordRichPresence.cs | 4 +- Properties/Resources.Designer.cs | 92 +++++++++++++++++++++++++++++- Properties/Resources.resx | 32 ++++++++++- Spark.csproj | 2 +- Windows/LiveWindow.xaml | 4 +- Windows/LiveWindow.xaml.cs | 16 +++--- Windows/UnifiedSettingsWindow.xaml | 16 +++--- 7 files changed, 143 insertions(+), 23 deletions(-) diff --git a/DiscordRichPresence.cs b/DiscordRichPresence.cs index 26a3fea..604e83f 100644 --- a/DiscordRichPresence.cs +++ b/DiscordRichPresence.cs @@ -149,8 +149,8 @@ public static void ProcessDiscordPresence(g_Instance frame) rp.WithSecrets(new Secrets { - JoinSecret = "ignitebot://choose/" + frame.sessionid, - SpectateSecret = "ignitebot://spectate/" + frame.sessionid, + JoinSecret = "spark://c/" + frame.sessionid, + SpectateSecret = "spark://s/" + frame.sessionid, }); } else diff --git a/Properties/Resources.Designer.cs b/Properties/Resources.Designer.cs index c830c0e..6efc2c5 100644 --- a/Properties/Resources.Designer.cs +++ b/Properties/Resources.Designer.cs @@ -449,6 +449,15 @@ public static string Compressing_Replay_File___ { } } + /// + /// Looks up a localized string similar to Connect. + /// + public static string Connect { + get { + return ResourceManager.GetString("Connect", resourceCulture); + } + } + /// /// Looks up a localized string similar to Contribute. /// @@ -530,6 +539,15 @@ public static string Default_Configuration { } } + /// + /// Looks up a localized string similar to Disable Replay Buffer. + /// + public static string Disable_Replay_Buffer { + get { + return ResourceManager.GetString("Disable Replay Buffer", resourceCulture); + } + } + /// /// Looks up a localized string similar to Disc Speed (m/s). /// @@ -719,6 +737,15 @@ public static string Enable_NVIDIA_Highlights { } } + /// + /// Looks up a localized string similar to Enable Replay Buffer. + /// + public static string Enable_Replay_Buffer { + get { + return ResourceManager.GetString("Enable Replay Buffer", resourceCulture); + } + } + /// /// Looks up a localized string similar to Makes sure EchoVR is the topmost window every few seconds.. /// @@ -1137,6 +1164,15 @@ public static string Interception { } } + /// + /// Looks up a localized string similar to IP Address:. + /// + public static string IP_Address_ { + get { + return ResourceManager.GetString("IP Address:", resourceCulture); + } + } + /// /// Looks up a localized string similar to Japanese Translation:. /// @@ -1245,6 +1281,15 @@ public static string Language { } } + /// + /// Looks up a localized string similar to Last Throw. + /// + public static string Last_Throw { + get { + return ResourceManager.GetString("Last Throw", resourceCulture); + } + } + /// /// Looks up a localized string similar to Length:. /// @@ -1454,7 +1499,16 @@ public static string NVIDIAHighlights { } /// - /// Looks up a localized string similar to OBS integration requires the OBS Websocket plugin.. + /// Looks up a localized string similar to OBS. + /// + public static string OBS { + get { + return ResourceManager.GetString("OBS", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to OBS integration requires the OBS Websocket plugin. The replay buffer must be set up in OBS settings before this feature can work.. /// public static string OBS_integration_requires_the_OBS_Websocket_plugin_ { get { @@ -1562,6 +1616,15 @@ public static string Orange_Team { } } + /// + /// Looks up a localized string similar to Password:. + /// + public static string Password_ { + get { + return ResourceManager.GetString("Password:", resourceCulture); + } + } + /// /// Looks up a localized string similar to Personal. /// @@ -2231,6 +2294,15 @@ public static string Start_Minimized { } } + /// + /// Looks up a localized string similar to Start Replay Buffer. + /// + public static string Start_Replay_Buffer { + get { + return ResourceManager.GetString("Start Replay Buffer", resourceCulture); + } + } + /// /// Looks up a localized string similar to Start with Windows. /// @@ -2258,6 +2330,24 @@ public static string Stop_Echo_Speaker_System { } } + /// + /// Looks up a localized string similar to Stop Hosting. + /// + public static string Stop_Hosting { + get { + return ResourceManager.GetString("Stop Hosting", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Stop Replay Buffer. + /// + public static string Stop_Replay_Buffer { + get { + return ResourceManager.GetString("Stop Replay Buffer", resourceCulture); + } + } + /// /// Looks up a localized string similar to Stop Spectating Me. /// diff --git a/Properties/Resources.resx b/Properties/Resources.resx index a82ecbe..9bc00b7 100644 --- a/Properties/Resources.resx +++ b/Properties/Resources.resx @@ -1059,7 +1059,7 @@ Old Replay folder: 'C:\Users\[USER]\Documents\IgniteBot\' Auto-connect - OBS integration requires the OBS Websocket plugin. + OBS integration requires the OBS Websocket plugin. The replay buffer must be set up in OBS settings before this feature can work. .echoreplay Clips @@ -1070,4 +1070,34 @@ Old Replay folder: 'C:\Users\[USER]\Documents\IgniteBot\' Enable API Access + + Stop Hosting + + + Last Throw + + + Enable Replay Buffer + + + Disable Replay Buffer + + + Start Replay Buffer + + + Stop Replay Buffer + + + Connect + + + Password: + + + IP Address: + + + OBS + \ No newline at end of file diff --git a/Spark.csproj b/Spark.csproj index 8cd93f6..22c51a5 100644 --- a/Spark.csproj +++ b/Spark.csproj @@ -7,7 +7,7 @@ Spark.App img\ignite_logo.ico true - 2.2.10 + 2.2.11 https://www.ignitevr.gg/spark IgniteVR NtsFranz, VTSxKING, iblowatsports, Graic diff --git a/Windows/LiveWindow.xaml b/Windows/LiveWindow.xaml index 1a9af42..f816629 100644 --- a/Windows/LiveWindow.xaml +++ b/Windows/LiveWindow.xaml @@ -8,7 +8,7 @@ xmlns:p="clr-namespace:Spark.Properties" mc:Ignorable="d" Title="Spark" - Height="650" Width="1060" + Height="660" Width="1080" FontSize="14" Background="{DynamicResource BackgroundColour}" ResizeMode="CanResize" @@ -99,7 +99,7 @@ - + diff --git a/Windows/LiveWindow.xaml.cs b/Windows/LiveWindow.xaml.cs index 2d750b2..9299bb5 100644 --- a/Windows/LiveWindow.xaml.cs +++ b/Windows/LiveWindow.xaml.cs @@ -338,7 +338,7 @@ private void Update(object source, ElapsedEventArgs e) if (Program.lastFrame != null) // 'mpl_lobby_b2' may change in the future { // session ID - sessionIdTextBox.Text = ""; + sessionIdTextBox.Text = CurrentLink(Program.lastFrame.sessionid); // ip stuff if (Program.lastFrame.sessionip != lastIP) @@ -623,7 +623,7 @@ private void Update(object source, ElapsedEventArgs e) } - hostMatchButton.IsEnabled = Program.lastFrame != null && Program.lastFrame.private_match == true; + hostMatchButton.IsEnabled = Program.lastFrame != null && Program.lastFrame.private_match; if (Program.lastFrame != null) { @@ -1323,7 +1323,7 @@ private static string CurrentLink(string sessionid) switch (Settings.Default.atlasLinkStyle) { case 0: - link = ""; + link = ""; break; case 1: link = ""; @@ -1338,7 +1338,7 @@ private static string CurrentLink(string sessionid) switch (Settings.Default.atlasLinkStyle) { case 0: - link = "ignitebot://choose/" + sessionid; + link = "spark://c/" + sessionid; break; case 1: link = "atlas://j/" + sessionid; @@ -1413,13 +1413,13 @@ private void HostMatchClicked(object sender, RoutedEventArgs e) Program.atlasHostingThread.IsBackground = true; Program.atlasHostingThread.Start(); hostingMatchCheckbox.IsChecked = true; - hostingMatchLabel.Content = "Stop Hosting"; + hostingMatchLabel.Content = Properties.Resources.Stop_Hosting; } else { Program.hostedAtlasSessionId = ""; hostingMatchCheckbox.IsChecked = false; - hostingMatchLabel.Content = "Host Match"; + hostingMatchLabel.Content = Properties.Resources.Host_Match; } } @@ -1613,7 +1613,7 @@ private void UpdateUIWithAtlasMatches(IEnumerable matches) { Process.Start(new ProcessStartInfo { - FileName = "ignitebot://choose/" + match.matchid, + FileName = "spark://c/" + match.matchid, UseShellExecute = true }); }; @@ -1806,7 +1806,7 @@ private void AtlasHostingThread() Dispatcher.Invoke(() => { hostingMatchCheckbox.IsChecked = false; - hostingMatchLabel.Content = "Host Match"; + hostingMatchLabel.Content = Properties.Resources.Host_Match; }); Thread.Sleep(10); GetAtlasMatches(); diff --git a/Windows/UnifiedSettingsWindow.xaml b/Windows/UnifiedSettingsWindow.xaml index 2e18cd6..6c60a6b 100644 --- a/Windows/UnifiedSettingsWindow.xaml +++ b/Windows/UnifiedSettingsWindow.xaml @@ -92,7 +92,7 @@