Added GetSplash method (WONT BUILD)

pull/9/head
troy0h 6 years ago
parent a3eec0074e
commit 4e10493d31

@ -119,9 +119,6 @@ namespace AM2RLauncher
Environment.Exit(0); Environment.Exit(0);
} }
log.Info("Mutex check passed. Entering main thread."); log.Info("Mutex check passed. Entering main thread.");
log.Info("Current Launcher Version: " + VERSION); log.Info("Current Launcher Version: " + VERSION);
log.Info("Current Platform-ID is: " + Platform.ID); log.Info("Current Platform-ID is: " + Platform.ID);
@ -161,9 +158,8 @@ namespace AM2RLauncher
} }
// Custom splash texts // Custom splash texts
Random rng = new Random(); var Splash = new Splash() ;
// Some fanciness so we can have Gtk-only quips, because Gtk visuals are lame. string splash = Splash.GetSplash();
string splash = Splash.SPLASH_LIST[rng.Next(0, Splash.SPLASH_LIST.Length - (Platform.IsGtk ? 0 : 13))];
log.Info("Randomly chosen splash: " + splash); log.Info("Randomly chosen splash: " + splash);
// Load bitmaps // Load bitmaps

@ -1,12 +1,12 @@
using System; using Eto;
using System.Collections.Generic; using System;
using System.Text;
namespace AM2RLauncher namespace AM2RLauncher
{ {
class Splash class Splash
{ {
public static readonly string[] SPLASH_LIST = // Splash strings
readonly string[] splashList =
{ {
"The real Ridley is the friends we made along the way.", "The real Ridley is the friends we made along the way.",
"Now with 100% more Septoggs!", "Now with 100% more Septoggs!",
@ -45,5 +45,13 @@ namespace AM2RLauncher
"Was a mouse really that expensive, i3 users!?", "Was a mouse really that expensive, i3 users!?",
"Imagine using non-free software." "Imagine using non-free software."
}; };
// Get random splash string
public string GetSplash()
{
Random rng = new Random();
string splashString = splashList[rng.Next(0, splashList.Length - (Platform.IsGtk ? 0 : 13))];
return splashString;
}
} }
} }
Loading…
Cancel
Save