Skip to content

Commit

Permalink
moved some more stuff to resources, increased window size, switched l…
Browse files Browse the repository at this point in the history
…ivewindow link to follow setting, switched ignitebot links to spark links
  • Loading branch information
NtsFranz committed Apr 12, 2021
1 parent 47d4bcc commit 47754db
Show file tree
Hide file tree
Showing 7 changed files with 143 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DiscordRichPresence.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
92 changes: 91 additions & 1 deletion Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 31 additions & 1 deletion Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ Old Replay folder: 'C:\Users\[USER]\Documents\IgniteBot\'
<value>Auto-connect</value>
</data>
<data name="OBS integration requires the OBS Websocket plugin." xml:space="preserve">
<value>OBS integration requires the OBS Websocket plugin.</value>
<value>OBS integration requires the OBS Websocket plugin. The replay buffer must be set up in OBS settings before this feature can work.</value>
</data>
<data name=".echoreplay Clips" xml:space="preserve">
<value>.echoreplay Clips</value>
Expand All @@ -1070,4 +1070,34 @@ Old Replay folder: 'C:\Users\[USER]\Documents\IgniteBot\'
<data name="Enable API Access" xml:space="preserve">
<value>Enable API Access</value>
</data>
<data name="Stop Hosting" xml:space="preserve">
<value>Stop Hosting</value>
</data>
<data name="Last Throw" xml:space="preserve">
<value>Last Throw</value>
</data>
<data name="Enable Replay Buffer" xml:space="preserve">
<value>Enable Replay Buffer</value>
</data>
<data name="Disable Replay Buffer" xml:space="preserve">
<value>Disable Replay Buffer</value>
</data>
<data name="Start Replay Buffer" xml:space="preserve">
<value>Start Replay Buffer</value>
</data>
<data name="Stop Replay Buffer" xml:space="preserve">
<value>Stop Replay Buffer</value>
</data>
<data name="Connect" xml:space="preserve">
<value>Connect</value>
</data>
<data name="Password:" xml:space="preserve">
<value>Password:</value>
</data>
<data name="IP Address:" xml:space="preserve">
<value>IP Address:</value>
</data>
<data name="OBS" xml:space="preserve">
<value>OBS</value>
</data>
</root>
2 changes: 1 addition & 1 deletion Spark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<StartupObject>Spark.App</StartupObject>
<ApplicationIcon>img\ignite_logo.ico</ApplicationIcon>
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
<Version>2.2.10</Version>
<Version>2.2.11</Version>
<PackageProjectUrl>https://www.ignitevr.gg/spark</PackageProjectUrl>
<Company>IgniteVR</Company>
<Authors>NtsFranz, VTSxKING, iblowatsports, Graic</Authors>
Expand Down
4 changes: 2 additions & 2 deletions Windows/LiveWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -99,7 +99,7 @@
<GroupBox x:Name="playerSpeedsGroupbox" Grid.Row="0" Grid.Column="0" Margin="10,10,10,10" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<GroupBox.Header>
<ComboBox SelectedIndex="{l:SettingBinding dashboardItem1}" SelectionChanged="DashboardItem1Changed">
<ComboBoxItem Content="Last Throw"/>
<ComboBoxItem Content="{x:Static p:Resources.Last_Throw}"/>
<ComboBoxItem Content="{x:Static p:Resources.Player_Speeds}" />
</ComboBox>
</GroupBox.Header>
Expand Down
16 changes: 8 additions & 8 deletions Windows/LiveWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<ignitebot://choose/" + Program.lastFrame.sessionid + ">";
sessionIdTextBox.Text = CurrentLink(Program.lastFrame.sessionid);

// ip stuff
if (Program.lastFrame.sessionip != lastIP)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -1323,7 +1323,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 + ">";
Expand All @@ -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;
Expand Down Expand Up @@ -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;
}
}

Expand Down Expand Up @@ -1613,7 +1613,7 @@ private void UpdateUIWithAtlasMatches(IEnumerable<AtlasMatch> matches)
{
Process.Start(new ProcessStartInfo
{
FileName = "ignitebot://choose/" + match.matchid,
FileName = "spark://c/" + match.matchid,
UseShellExecute = true
});
};
Expand Down Expand Up @@ -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();
Expand Down
16 changes: 8 additions & 8 deletions Windows/UnifiedSettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@

<StackPanel Height="37" Orientation="Horizontal" Margin="10,4,4,-8">
<Label x:Name="echoVRIPLabel" Content="{x:Static p:Resources.EchoVR_IP__for_Quest_}" Margin="4,4,4,4" />
<TextBox x:Name="echoVRIPTextBox" Text="{l:SettingLoad echoVRIP}" TextWrapping="Wrap" Width="140"
<TextBox x:Name="echoVRIPTextBox" Text="{l:SettingLoad echoVRIP}" TextWrapping="Wrap" Width="130"
Margin="4,4,4,4" VerticalAlignment="Center" FontFamily="Consolas"
Padding="4,4,4,4" TextChanged="EchoVRIPChanged" />
<TextBox x:Name="echoVRPortTextBox" Text="{l:SettingLoad echoVRPort}" TextWrapping="Wrap" Width="60"
Expand Down Expand Up @@ -351,25 +351,25 @@

</StackPanel>
</TabItem>
<TabItem Header="OBS" Padding="8,6,8,6">
<TabItem Header="{x:Static p:Resources.OBS}" Padding="8,6,8,6">

<StackPanel>
<TextBlock Margin="8,8,8,8">
<TextBlock Margin="8,8,8,8" TextWrapping="Wrap">
<Run Text="{x:Static p:Resources.OBS_integration_requires_the_OBS_Websocket_plugin_}"/><LineBreak/>
<Hyperlink NavigateUri="https://github.com/Palakis/obs-websocket/releases/download/4.9.0/obs-websocket-4.9.0-Windows-Installer.exe" RequestNavigate="Hyperlink_RequestNavigate">Download Installer from GitHub.</Hyperlink>
</TextBlock>
<StackPanel Orientation="Horizontal">
<Label Content="IP Address:" Margin="4,4,0,4" Padding="4,4,4,4"/>
<Label Content="{x:Static p:Resources.IP_Address_}" Margin="4,4,0,4" Padding="4,4,4,4"/>
<TextBox Text="{l:SettingBinding obsIP}" Width="160" Margin="4,4,4,4" Padding="4,4,4,4"/>
<Label Content="Password:" Margin="4,4,0,4" Padding="4,4,4,4"/>
<Label Content="{x:Static p:Resources.Password_}" Margin="4,4,0,4" Padding="4,4,4,4"/>
<PasswordBox x:Name="obsPasswordBox" Password="" Width="140" Margin="4,4,4,4" Padding="4,4,4,4" PasswordChanged="OBSPasswordChanged" />
<Button x:Name="obsConnectButton" Content="Connect" Click="OBSConnect" Margin="4,4,4,4" Padding="4,4,4,4"/>
<Button x:Name="obsConnectButton" Content="{x:Static p:Resources.Connect}" Click="OBSConnect" Margin="4,4,4,4" Padding="4,4,4,4"/>
</StackPanel>
<CheckBox Content="{x:Static p:Resources.Auto_connect}" IsChecked="{l:SettingBinding obsAutoconnect}" Margin="5,5,5,5"/>
<StackPanel Orientation="Horizontal">
<CheckBox Content="{x:Static p:Resources.Auto_start_Replay_Buffer}" IsChecked="{l:SettingBinding obsAutostartReplayBuffer}" Margin="5,5,5,5"/>
<Button x:Name="obsStartReplayBufferButton" Content="Start Replay Buffer" Click="OBSStartReplayBuffer" Margin="4,4,4,4" Padding="4,4,4,4"/>
<Button x:Name="obsStopReplayBufferButton" Content="Stop Replay Buffer" Click="OBSStopReplayBuffer" Margin="4,4,4,4" Padding="4,4,4,4"/>
<Button x:Name="obsStartReplayBufferButton" Content="{x:Static p:Resources.Start_Replay_Buffer}" Click="OBSStartReplayBuffer" Margin="4,4,4,4" Padding="4,4,4,4"/>
<Button x:Name="obsStopReplayBufferButton" Content="{x:Static p:Resources.Stop_Replay_Buffer}" Click="OBSStopReplayBuffer" Margin="4,4,4,4" Padding="4,4,4,4"/>
</StackPanel>
</StackPanel>
</TabItem>
Expand Down

0 comments on commit 47754db

Please sign in to comment.