From 8e74cbfb3854597ed459841793a645a04611d278 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 6 Oct 2016 12:50:41 +1100 Subject: [PATCH] Launcher: add an awful options button image. --- Launcher2/Gui/Views/MainView.cs | 6 +++- Launcher2/Launcher2.csproj | 1 + Launcher2/Utils/Bitmaps.cs | 51 +++++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 Launcher2/Utils/Bitmaps.cs diff --git a/Launcher2/Gui/Views/MainView.cs b/Launcher2/Gui/Views/MainView.cs index fcd6bbff0..3b0fa98b0 100644 --- a/Launcher2/Gui/Views/MainView.cs +++ b/Launcher2/Gui/Views/MainView.cs @@ -13,7 +13,7 @@ namespace Launcher.Gui.Views { const int buttonWidth = 220, buttonHeight = 35, sideButtonWidth = 150; public MainView( LauncherWindow game ) : base( game ) { - widgets = new Widget[13]; + widgets = new Widget[14]; } public override void Init() { @@ -90,6 +90,10 @@ namespace Launcher.Gui.Views { .SetLocation( Anchor.Centre, Anchor.Centre, 250, -20 ); widgets[sslIndex].Visible = sslVisible; widgets[sslIndex + 1].Visible = sslVisible; + + Makers.Bitmap( this, Bitmaps.OptionsIndices, + Bitmaps.OptionsPalette, Bitmaps.OptionsSize ) + .SetLocation( Anchor.BottomOrRight, Anchor.LeftOrTop, -5, 5 ); } } } diff --git a/Launcher2/Launcher2.csproj b/Launcher2/Launcher2.csproj index c134118fd..b037bc4b8 100644 --- a/Launcher2/Launcher2.csproj +++ b/Launcher2/Launcher2.csproj @@ -108,6 +108,7 @@ + diff --git a/Launcher2/Utils/Bitmaps.cs b/Launcher2/Utils/Bitmaps.cs new file mode 100644 index 000000000..c2acbcc82 --- /dev/null +++ b/Launcher2/Utils/Bitmaps.cs @@ -0,0 +1,51 @@ +// ClassicalSharp copyright 2014-2016 UnknownShadow200 | Licensed under MIT +using System; +using ClassicalSharp; + +namespace Launcher { + + internal static class Bitmaps { + + public static int OptionsSize = 32; + + public static byte[] OptionsIndices = new byte[] { + 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x10, 0x02, 0x20, 0x01, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x01, 0x11, 0x11, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x11, 0x11, 0x10, 0x00, 0x00, + 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, + 0x00, 0x01, 0x11, 0x10, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x01, 0x11, 0x10, 0x00, + 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, + 0x01, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x10, + 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x10, + 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, + 0x11, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x11, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, + 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, + 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, + 0x01, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x10, + 0x01, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x10, + 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x00, + 0x00, 0x01, 0x11, 0x10, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x01, 0x11, 0x10, 0x00, + 0x00, 0x00, 0x11, 0x11, 0x00, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x00, 0x11, 0x11, 0x10, 0x00, + 0x00, 0x00, 0x01, 0x11, 0x11, 0x00, 0x00, 0x02, 0x20, 0x00, 0x00, 0x11, 0x11, 0x11, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x00, 0x02, 0x20, 0x00, 0x11, 0x11, 0x11, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x01, 0x11, 0x11, 0x11, 0x11, 0x11, 0x11, 0x10, 0x00, 0x00, 0x00, 0x00, + }; + + public static FastColour[] OptionsPalette = new FastColour[] { + new FastColour( 0, 0, 0, 0 ), new FastColour( 255, 255, 255 ), + new FastColour( 225, 225, 225 ), + }; + } +}