You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
936 B

using SCI.CursesWrapper;
namespace Fahrplan.Screens;
public class IntroScreen : Window {
/// <summary>
/// Pass class constructor through to inherited constructor
/// </summary>
/// <param name="parentWindow">Parent window of this window object</param>
public IntroScreen (Window parentWindow) :
base (
0, 0,
parentWindow.GetUsableWidth (),
parentWindow.GetUsableHeight (),
parentWindow
)
{
string asciiArt = SCI.AsciiArt.Generator.FromImage (
"res" + Path.DirectorySeparatorChar + "38c3.jpg",
GetUsableWidth ()
).Result;
string asciiArtPlusText =
"Press F1 for a quick start guide or simply press Enter\n" +
"to see upcoming events\n" +
asciiArt +
"38C3 Fahrplan in your terminal!";
AsciiArt.ShowCentered (WindowId, asciiArtPlusText);
// Close intro screen on any keypress
OnKeyPress += (object sender, NCursesKeyPressEventArgs e) => {
((Window) sender).Destroy ();
};
}
}