diff --git a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs index 359df85..c67b61b 100644 --- a/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs +++ b/AM2RLauncher/AM2RLauncher/MainForm/MainForm.UI.cs @@ -52,44 +52,6 @@ namespace AM2RLauncher /// /// A - of custom splashes. /// - static readonly private string[] SPLASH_LIST = { - "The real Ridley is the friends we made along the way.", - "Now with 100% more Septoggs!", - "Now with 100% more Blob Throwers!", - "Speedrun THIS, I dare you.", - "The broken pipe is a lie.", - "Overcommitting to April Fool's since 2018.", - "Also try Metroid II: Return of Samus!", - "Also try Metroid: Samus Returns!", - "Also try Prime 2D!", - "Trust me, it's an 'unintentional feature.'", - "Coming soon to a PC near you!", - "This ain't your parents' Metroid 2!", - "Now setting boss pattern to S P E E N", - "You S P E E N me right round, baby!", - "Wait, I thought Metroid was a guy!", - "jellyfish is helping yes", - "Why can't Metroid crawl?", - "When in doubt, blame GameMaker.", - "It just works™", - "Reject C++, return to ABSTRACTION", - "C# is just C++++ with Windows support.", - "Use of the Launcher has now been authorized!", - // GTK splashes begin here - "Sorry this is ugly, but at least it works.", - "GTK + QT = 💣", - "I hope you use Arch, btw", - "All your Ubuntu are belong to Arch btw.", - "Help, how do I quit vim!?", - "The bloat isn't our fault, YoYo Games forced 1GB dependencies!", - "The quieter you are, the more Metroids you can hear.", - "What you are referring to as AM2R, is in fact, GNU/AM2R.", - "GNOME be gone!", - "Go compile your own girlfriend. This one doesn't count, she's out of your league.", - "Year 3115, NVIDIA still doesn't support Wayland.", - "Was a mouse really that expensive, i3 users!?", - "Imagine using non-free software." - }; /// /// The current Launcher version. @@ -157,9 +119,6 @@ namespace AM2RLauncher Environment.Exit(0); } - - - log.Info("Mutex check passed. Entering main thread."); log.Info("Current Launcher Version: " + VERSION); log.Info("Current Platform-ID is: " + Platform.ID); @@ -199,9 +158,7 @@ namespace AM2RLauncher } // Custom splash texts - Random rng = new Random(); - // Some fanciness so we can have Gtk-only quips, because Gtk visuals are lame. - string splash = SPLASH_LIST[rng.Next(0, SPLASH_LIST.Length - (Platform.IsGtk ? 0 : 13))]; + string splash = Splash.GetSplash(); log.Info("Randomly chosen splash: " + splash); // Load bitmaps diff --git a/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs b/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs new file mode 100644 index 0000000..60859fc --- /dev/null +++ b/AM2RLauncher/AM2RLauncher/MainForm/Splash.cs @@ -0,0 +1,80 @@ +using Eto; +using System; +using System.Collections.Generic; +using System.Linq; + +namespace AM2RLauncher +{ + /// + /// Class only for providing Splashes + /// + static class Splash + { + /// + /// Cross-Platform splash strings + /// + static readonly string[] generalSplash = + { + "The real Ridley is the friends we made along the way.", + "Now with 100% more Septoggs!", + "Now with 100% more Blob Throwers!", + "Speedrun THIS, I dare you.", + "The broken pipe is a lie.", + "Overcommitting to April Fool's since 2018.", + "Also try Metroid II: Return of Samus!", + "Also try Metroid: Samus Returns!", + "Also try Prime 2D!", + "Trust me, it's an 'unintentional feature.'", + "Coming soon to a PC near you!", + "This ain't your parents' Metroid 2!", + "Now setting boss pattern to S P E E N", + "You S P E E N me right round, baby!", + "Wait, I thought Metroid was a guy!", + "jellyfish is helping yes", + "Why can't Metroid crawl?", + "When in doubt, blame GameMaker.", + "It just works™", + "Reject C++, return to ABSTRACTION", + "C# is just C++++ with Windows support.", + "Use of the Launcher has now been authorized!", + }; + + /// + /// Linux only splash strings + /// + static readonly string[] linuxSplash = + { + "Sorry this is ugly, but at least it works.", + "GTK + QT = 💣", + "I hope you use Arch, btw", + "All your Ubuntu are belong to Arch btw.", + "Help, how do I quit vim!?", + "The bloat isn't our fault, YoYo Games forced 1GB dependencies!", + "The quieter you are, the more Metroids you can hear.", + "What you are referring to as AM2R, is in fact, GNU/AM2R.", + "GNOME be gone!", + "Go compile your own girlfriend. This one doesn't count, she's out of your league.", + "Year 3115, NVIDIA still doesn't support Wayland.", + "Was a mouse really that expensive, i3 users!?", + "Imagine using non-free software." + }; + + /// + /// Get a random splash string, according to the current OS. + /// + /// The randomly chosen splash as a . + static public string GetSplash() + { + string[] combinedSplash; + Random rng = new Random(); + + if (Platform.Instance.IsGtk) + combinedSplash = generalSplash.Concat(linuxSplash).ToArray(); + else + combinedSplash = generalSplash; + + string splashString = combinedSplash[rng.Next(0, combinedSplash.Length)]; + return splashString; + } + } +}