diff --git a/Bloxstrap/Bloxstrap.csproj b/Bloxstrap/Bloxstrap.csproj index aa1b61a..16b56e6 100644 --- a/Bloxstrap/Bloxstrap.csproj +++ b/Bloxstrap/Bloxstrap.csproj @@ -20,6 +20,7 @@ + diff --git a/Bloxstrap/Resources/BootstrapperStyles/ByfronDialog/Matt.png b/Bloxstrap/Resources/BootstrapperStyles/ByfronDialog/Matt.png new file mode 100644 index 0000000..2f97480 Binary files /dev/null and b/Bloxstrap/Resources/BootstrapperStyles/ByfronDialog/Matt.png differ diff --git a/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml b/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml index a414499..8bdd277 100644 --- a/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml +++ b/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml @@ -12,12 +12,17 @@ d:DesignHeight="1500" d:DesignWidth="800" d:DataContext="{d:DesignInstance dmodels:AboutViewModel, IsDesignTimeCreatable=True}" Title="AboutPage" + KeyDown="UiPage_KeyDown" Scrollable="True"> + + + + + + + - - - @@ -25,7 +30,9 @@ - + + + diff --git a/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml.cs b/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml.cs index d6a1bdc..4e22167 100644 --- a/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml.cs +++ b/Bloxstrap/UI/Elements/About/Pages/AboutPage.xaml.cs @@ -1,5 +1,8 @@ using Bloxstrap.UI.ViewModels.About; +using System.Windows.Input; +using System.Windows.Media.Animation; + namespace Bloxstrap.UI.Elements.About.Pages { /// @@ -7,10 +10,39 @@ namespace Bloxstrap.UI.Elements.About.Pages /// public partial class AboutPage { + private readonly Queue _keys = new(); + + private readonly List _expectedKeys = new() { Key.M, Key.A, Key.T, Key.T, Key.LeftShift, Key.D1 }; + + private bool _triggered = false; + public AboutPage() { DataContext = new AboutViewModel(); InitializeComponent(); } + + private void UiPage_KeyDown(object sender, KeyEventArgs e) + { + if (_triggered) + return; + + if (_keys.Count >= 6) + _keys.Dequeue(); + + var key = e.Key; + + if (key == Key.RightShift) + key = Key.LeftShift; + + _keys.Enqueue(key); + + if (_keys.SequenceEqual(_expectedKeys)) + { + _triggered = true; + var storyboard = Resources["EggStoryboard"] as Storyboard; + storyboard!.Begin(); + } + } } }