From 3e5e0cfe669ababe2614c5a41acf99ac22f7d29b Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Sat, 28 Mar 2020 15:52:13 -0400 Subject: [PATCH 01/10] Fixing some UI styling --- src/InteractiveSeven/App.xaml | 5 +++++ src/InteractiveSeven/MainWindow.xaml | 20 ++++++++++---------- src/InteractiveSeven/SettingsWindow.xaml | 16 ++++++++-------- 3 files changed, 23 insertions(+), 18 deletions(-) diff --git a/src/InteractiveSeven/App.xaml b/src/InteractiveSeven/App.xaml index 6a715955..82fdc979 100644 --- a/src/InteractiveSeven/App.xaml +++ b/src/InteractiveSeven/App.xaml @@ -23,6 +23,11 @@ + + diff --git a/src/InteractiveSeven/MainWindow.xaml b/src/InteractiveSeven/MainWindow.xaml index 75373473..a40824e9 100644 --- a/src/InteractiveSeven/MainWindow.xaml +++ b/src/InteractiveSeven/MainWindow.xaml @@ -17,20 +17,20 @@ - + @@ -59,11 +59,11 @@ - + @@ -86,7 +86,7 @@ - + @@ -111,7 +111,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -168,7 +168,7 @@ - + @@ -194,7 +194,7 @@ - + diff --git a/src/InteractiveSeven/SettingsWindow.xaml b/src/InteractiveSeven/SettingsWindow.xaml index 550006f3..079ccb46 100644 --- a/src/InteractiveSeven/SettingsWindow.xaml +++ b/src/InteractiveSeven/SettingsWindow.xaml @@ -39,7 +39,7 @@ - + @@ -98,7 +98,7 @@ - + @@ -152,7 +152,7 @@ - + @@ -301,7 +301,7 @@ - + @@ -388,7 +388,7 @@ - + @@ -599,7 +599,7 @@ - + @@ -831,7 +831,7 @@ - + @@ -902,7 +902,7 @@ - + From 25ee06edbf3c8be9452119376d4a7372a2156b5c Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Wed, 29 Apr 2020 23:48:03 -0400 Subject: [PATCH 02/10] Adjust sub window start location --- src/InteractiveSeven/MainWindow.xaml.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/InteractiveSeven/MainWindow.xaml.cs b/src/InteractiveSeven/MainWindow.xaml.cs index ec38e67f..41d74167 100644 --- a/src/InteractiveSeven/MainWindow.xaml.cs +++ b/src/InteractiveSeven/MainWindow.xaml.cs @@ -44,8 +44,8 @@ private void ChangeSettingsButtonClick(object sender, RoutedEventArgs e) _settingsWindow = new SettingsWindow(ViewModel.SettingsViewModel); _settingsWindow.Owner = this; _settingsWindow.Closed += (o, args) => _settingsWindow = null; - _settingsWindow.Left = Left + ActualWidth / 3.0; - _settingsWindow.Top = Top + ActualHeight / 3.0; + _settingsWindow.Left = Left + ActualWidth / 6.0; + _settingsWindow.Top = Top + ActualHeight / 6.0; _settingsWindow.Show(); } @@ -61,8 +61,8 @@ private void ChangeAppStyleButtonClick(object sender, RoutedEventArgs e) _accentThemeTestWindow = new AccentStyleWindow(); _accentThemeTestWindow.Owner = this; _accentThemeTestWindow.Closed += (o, args) => _accentThemeTestWindow = null; - _accentThemeTestWindow.Left = Left + ActualWidth / 2.0; - _accentThemeTestWindow.Top = Top + ActualHeight / 2.0; + _accentThemeTestWindow.Left = Left + ActualWidth / 4.0; + _accentThemeTestWindow.Top = Top + ActualHeight / 4.0; _accentThemeTestWindow.Show(); } } From 22ee672f2e815f40cf6ee222b292808487944d6c Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Thu, 30 Apr 2020 00:08:42 -0400 Subject: [PATCH 03/10] Styling TabItems --- src/InteractiveSeven/App.xaml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/InteractiveSeven/App.xaml b/src/InteractiveSeven/App.xaml index 82fdc979..c55e7afb 100644 --- a/src/InteractiveSeven/App.xaml +++ b/src/InteractiveSeven/App.xaml @@ -2,7 +2,7 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lvc="clr-namespace:InteractiveSeven.ValueConverters" - xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" + xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" Startup="App_OnStartup" Exit="App_OnExit" > @@ -28,6 +28,30 @@ + + From 4185af7d0eb24aee7404a88499864c7324a56b73 Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Thu, 30 Apr 2020 01:02:34 -0400 Subject: [PATCH 04/10] Better TabItem Header Forground Styling --- src/InteractiveSeven/App.xaml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/InteractiveSeven/App.xaml b/src/InteractiveSeven/App.xaml index c55e7afb..7a0982b4 100644 --- a/src/InteractiveSeven/App.xaml +++ b/src/InteractiveSeven/App.xaml @@ -2,12 +2,12 @@ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:lvc="clr-namespace:InteractiveSeven.ValueConverters" - xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" Startup="App_OnStartup" Exit="App_OnExit" > /InteractiveSeven;component/Assets/FontAwesome5_Free-Solid-900.otf#Font Awesome 5 Free Solid + - - + + + + + Interactive Seven is intended to help the streamers have more interaction with + chat as well as allow them to earn some bits through command actions and bidding features. + + + In addition, it includes the Tseng Party Status Overlay, which allows the streamer to display + the current Status of their party in the game directly in their stream at all times. + + + In July 2019, Brendan and Joshua learned about each other's project and decided it made sense to + collaborate on a combined project, since both applications do similar work. This version of + Interactive Seven includes the Tseng Overlay. + + + + + + + + + The original Interactive Seven was created by Brendan Enrick as a way to give Twitch + chat control over streamers' instances of Final Fantasy 7 while they stream the game. + + + + + + + + The original Tseng Status Overlay was created by Joshua Moon, and + allows streamers playing Final Fantasy 7 to show the party status while playing. + + + + + + + + + - - - - - + + + - - - + + + + diff --git a/src/InteractiveSeven/ValueConverters/ColorToSolidBrushValueConverter.cs b/src/InteractiveSeven/ValueConverters/ColorToSolidBrushValueConverter.cs new file mode 100644 index 00000000..d9c941ef --- /dev/null +++ b/src/InteractiveSeven/ValueConverters/ColorToSolidBrushValueConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.Windows.Data; +using System.Windows.Media; + +namespace InteractiveSeven.ValueConverters +{ + public class ColorToSolidBrushValueConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is System.Drawing.Color drawColor) + { + return new SolidColorBrush(Color.FromRgb(drawColor.R, drawColor.G, drawColor.B)); + } + return new SolidColorBrush(Color.FromRgb(0, 0, 0)); + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file From 8795d2774b10d3369828c9687e2f958deea58b43 Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Sat, 2 May 2020 15:47:12 -0400 Subject: [PATCH 08/10] Color name display on dashboard --- src/InteractiveSeven/App.xaml | 1 + src/InteractiveSeven/MainWindow.xaml | 36 +++++++++++-------- .../ValueConverters/MenuColorNameConverter.cs | 24 +++++++++++++ 3 files changed, 47 insertions(+), 14 deletions(-) create mode 100644 src/InteractiveSeven/ValueConverters/MenuColorNameConverter.cs diff --git a/src/InteractiveSeven/App.xaml b/src/InteractiveSeven/App.xaml index 7b19d77f..32f5bdef 100644 --- a/src/InteractiveSeven/App.xaml +++ b/src/InteractiveSeven/App.xaml @@ -52,6 +52,7 @@ + diff --git a/src/InteractiveSeven/MainWindow.xaml b/src/InteractiveSeven/MainWindow.xaml index 089f920e..4419e5a6 100644 --- a/src/InteractiveSeven/MainWindow.xaml +++ b/src/InteractiveSeven/MainWindow.xaml @@ -80,20 +80,28 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + diff --git a/src/InteractiveSeven/ValueConverters/MenuColorNameConverter.cs b/src/InteractiveSeven/ValueConverters/MenuColorNameConverter.cs new file mode 100644 index 00000000..0d1b9a42 --- /dev/null +++ b/src/InteractiveSeven/ValueConverters/MenuColorNameConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace InteractiveSeven.ValueConverters +{ + public class MenuColorNameConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, CultureInfo culture) + { + if (value is System.Drawing.Color color) + { + string colorName = color.IsNamedColor ? color.Name : $"#{color.Name[2..]}"; + return $"{colorName} | R:{color.R} G:{color.G} B:{color.B}"; + } + return "Unexpected Binding"; + } + + public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) + { + return null; + } + } +} \ No newline at end of file From c7b7bfa30f38bf9307792a2f3f7a9fc395f7f56c Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Sat, 2 May 2020 16:07:40 -0400 Subject: [PATCH 09/10] Select All Textbox behavior for overlays --- .../Behaviors/SelectAllTextOnFocusBehavior.cs | 44 +++++++++++++++++++ src/InteractiveSeven/MainWindow.xaml | 21 +++++++-- 2 files changed, 61 insertions(+), 4 deletions(-) create mode 100644 src/InteractiveSeven/Behaviors/SelectAllTextOnFocusBehavior.cs diff --git a/src/InteractiveSeven/Behaviors/SelectAllTextOnFocusBehavior.cs b/src/InteractiveSeven/Behaviors/SelectAllTextOnFocusBehavior.cs new file mode 100644 index 00000000..81e1f493 --- /dev/null +++ b/src/InteractiveSeven/Behaviors/SelectAllTextOnFocusBehavior.cs @@ -0,0 +1,44 @@ +using Microsoft.Xaml.Behaviors; +using System.Windows.Controls; +using System.Windows.Input; + +namespace InteractiveSeven.Behaviors +{ + public class SelectAllTextOnFocusBehavior : Behavior + { + protected override void OnAttached() + { + base.OnAttached(); + AssociatedObject.GotKeyboardFocus += AssociatedObjectGotKeyboardFocus; + AssociatedObject.GotMouseCapture += AssociatedObjectGotMouseCapture; + AssociatedObject.PreviewMouseLeftButtonDown += AssociatedObjectPreviewMouseLeftButtonDown; + } + + protected override void OnDetaching() + { + base.OnDetaching(); + AssociatedObject.GotKeyboardFocus -= AssociatedObjectGotKeyboardFocus; + AssociatedObject.GotMouseCapture -= AssociatedObjectGotMouseCapture; + AssociatedObject.PreviewMouseLeftButtonDown -= AssociatedObjectPreviewMouseLeftButtonDown; + } + + private void AssociatedObjectGotKeyboardFocus(object sender, KeyboardFocusChangedEventArgs e) + { + AssociatedObject.SelectAll(); + } + + private void AssociatedObjectGotMouseCapture(object sender, MouseEventArgs e) + { + AssociatedObject.SelectAll(); + } + + private void AssociatedObjectPreviewMouseLeftButtonDown(object sender, MouseButtonEventArgs e) + { + if (!AssociatedObject.IsKeyboardFocusWithin) + { + AssociatedObject.Focus(); + e.Handled = true; + } + } + } +} \ No newline at end of file diff --git a/src/InteractiveSeven/MainWindow.xaml b/src/InteractiveSeven/MainWindow.xaml index 4419e5a6..29b7c3ed 100644 --- a/src/InteractiveSeven/MainWindow.xaml +++ b/src/InteractiveSeven/MainWindow.xaml @@ -3,9 +3,10 @@ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" - xmlns:wpfTool="clr-namespace:Xceed.Wpf.Toolkit;assembly=Xceed.Wpf.Toolkit" xmlns:mah="http://metro.mahapps.com/winfx/xaml/controls" xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks" + xmlns:b="http://schemas.microsoft.com/xaml/behaviors" + xmlns:behaviors="clr-namespace:InteractiveSeven.Behaviors" mc:Ignorable="d" BorderThickness="0" GlowBrush="{DynamicResource MahApps.Brushes.Accent}" @@ -179,11 +180,23 @@ - + + + + + - + + + + + - + + + + + From 67f9f6e0a3a84fec9ecbe55257c3002b9c9b6a1b Mon Sep 17 00:00:00 2001 From: Brendan Enrick <2243498+benrick@users.noreply.github.com> Date: Sat, 2 May 2020 16:27:37 -0400 Subject: [PATCH 10/10] Temp status display of settings --- src/InteractiveSeven/App.xaml | 1 + src/InteractiveSeven/MainWindow.xaml | 30 +++++++++++++++++-- .../ValueConverters/BoolToOnOffConverter.cs | 24 +++++++++++++++ 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/InteractiveSeven/ValueConverters/BoolToOnOffConverter.cs diff --git a/src/InteractiveSeven/App.xaml b/src/InteractiveSeven/App.xaml index 32f5bdef..fec1b0f8 100644 --- a/src/InteractiveSeven/App.xaml +++ b/src/InteractiveSeven/App.xaml @@ -49,6 +49,7 @@ + diff --git a/src/InteractiveSeven/MainWindow.xaml b/src/InteractiveSeven/MainWindow.xaml index 29b7c3ed..6f3541b8 100644 --- a/src/InteractiveSeven/MainWindow.xaml +++ b/src/InteractiveSeven/MainWindow.xaml @@ -43,6 +43,7 @@ HorizontalAlignment="Left" FontSize="20" /> + @@ -58,9 +59,10 @@ + + MinHeight="464" VerticalAlignment="Stretch" Margin="5" + VerticalContentAlignment="Stretch" MinWidth="580"> @@ -104,6 +106,30 @@ + + + + diff --git a/src/InteractiveSeven/ValueConverters/BoolToOnOffConverter.cs b/src/InteractiveSeven/ValueConverters/BoolToOnOffConverter.cs new file mode 100644 index 00000000..588c5ea4 --- /dev/null +++ b/src/InteractiveSeven/ValueConverters/BoolToOnOffConverter.cs @@ -0,0 +1,24 @@ +using System; +using System.Globalization; +using System.Windows.Data; + +namespace InteractiveSeven.ValueConverters +{ + [ValueConversion(typeof(bool), typeof(string))] + public sealed class BoolToOnOffConverter : IValueConverter + { + public object Convert(object value, Type targetType, + object parameter, CultureInfo culture) + { + if (!(value is bool)) + return null; + return (bool)value ? "On" : "Off"; + } + + public object ConvertBack(object value, Type targetType, + object parameter, CultureInfo culture) + { + throw new NotImplementedException(); + } + } +} \ No newline at end of file