diff --git a/Launcher2/Gui/Screens/ChooseModeScreen.cs b/Launcher2/Gui/Screens/ChooseModeScreen.cs index 619498816..5f89e8af0 100644 --- a/Launcher2/Gui/Screens/ChooseModeScreen.cs +++ b/Launcher2/Gui/Screens/ChooseModeScreen.cs @@ -90,17 +90,18 @@ namespace Launcher { protected virtual void MakeOtherWidgets() { } void ModeClick( bool classic, bool classicHacks ) { - game.ClassicMode = classic; + game.ClassicBackground = classic; Options.Load(); - Options.Set( "mode-classic", game.ClassicMode ); + Options.Set( "mode-classic", classic ); if( classic ) Options.Set( "nostalgia-hacks", classicHacks ); - Options.Set( "nostalgia-customblocks", !game.ClassicMode ); - Options.Set( "nostalgia-usecpe", !game.ClassicMode ); - Options.Set( "nostalgia-servertextures", !game.ClassicMode ); - Options.Set( "nostalgia-classictablist", game.ClassicMode ); - Options.Set( "nostalgia-classicoptions", game.ClassicMode ); + Options.Set( "nostalgia-classicbg", classic ); + Options.Set( "nostalgia-customblocks", !classic ); + Options.Set( "nostalgia-usecpe", !classic ); + Options.Set( "nostalgia-servertextures", !classic ); + Options.Set( "nostalgia-classictablist", classic ); + Options.Set( "nostalgia-classicoptions", classic ); Options.Set( "nostalgia-classicgui", true ); Options.Save(); diff --git a/Launcher2/Gui/Screens/ClassiCubeServersScreen.cs b/Launcher2/Gui/Screens/ClassiCubeServersScreen.cs index fc8f0aec1..4637321fb 100644 --- a/Launcher2/Gui/Screens/ClassiCubeServersScreen.cs +++ b/Launcher2/Gui/Screens/ClassiCubeServersScreen.cs @@ -120,7 +120,7 @@ namespace Launcher { int tableHeight = Math.Max( game.Height - tableY - 50, 1 ); Rectangle rec = new Rectangle( tableX, tableY, game.Width - tableX, tableHeight ); - if( !game.ClassicMode ) { + if( !game.ClassicBackground ) { FastColour col = LauncherTableWidget.backGridCol; Drawer2DExt.FastClear( dst, rec, col ); } else { diff --git a/Launcher2/Gui/Screens/MainScreen.cs b/Launcher2/Gui/Screens/MainScreen.cs index 85bc0a682..ed16e9143 100644 --- a/Launcher2/Gui/Screens/MainScreen.cs +++ b/Launcher2/Gui/Screens/MainScreen.cs @@ -70,7 +70,7 @@ namespace Launcher { Anchor.Centre, Anchor.Centre, 0, 110, (x, y) => Client.Start( widgets[0].Text, ref game.ShouldExit ) ); - if( !game.ClassicMode ) { + if( !game.ClassicBackground ) { MakeButtonAt( "Colours", 110, buttonHeight, buttonFont, Anchor.LeftOrTop, Anchor.BottomOrRight, 10, -10, (x, y) => game.SetScreen( new ColoursScreen( game ) ) ); diff --git a/Launcher2/Gui/TableWidget/LauncherTableWidget.cs b/Launcher2/Gui/TableWidget/LauncherTableWidget.cs index 6c37aa10b..71d071f3a 100644 --- a/Launcher2/Gui/TableWidget/LauncherTableWidget.cs +++ b/Launcher2/Gui/TableWidget/LauncherTableWidget.cs @@ -120,7 +120,7 @@ namespace Launcher { } } - if( separator && !Window.ClassicMode ) + if( separator && !Window.ClassicBackground ) drawer.Clear( LauncherSkin.BackgroundCol, x - 7, Y, 2, Height ); return maxWidth + 5; } @@ -157,7 +157,7 @@ namespace Launcher { void DrawGrid( IDrawer2D drawer, Font font, Font titleFont ) { DrawTextArgs args = new DrawTextArgs( "I", titleFont, true ); Size size = drawer.MeasureSize( ref args ); - if( !Window.ClassicMode ) + if( !Window.ClassicBackground ) drawer.Clear( LauncherSkin.BackgroundCol, X, Y + size.Height + 5, Width, 2 ); headerStartY = Y; @@ -168,11 +168,11 @@ namespace Launcher { int maxIndex; void DrawScrollbar( IDrawer2D drawer ) { - FastColour col = Window.ClassicMode ? new FastColour( 80, 80, 80 ) : LauncherSkin.ButtonBorderCol; + FastColour col = Window.ClassicBackground ? new FastColour( 80, 80, 80 ) : LauncherSkin.ButtonBorderCol; drawer.Clear( col, Window.Width - 10, Y, 10, Height ); float scale = Height / (float)Count; - col = Window.ClassicMode ? new FastColour( 160, 160, 160 ) : LauncherSkin.ButtonForeActiveCol; + col = Window.ClassicBackground ? new FastColour( 160, 160, 160 ) : LauncherSkin.ButtonForeActiveCol; int y1 = (int)(Y + CurrentIndex * scale); int height = (int)((maxIndex - CurrentIndex) * scale); drawer.Clear( col, Window.Width - 10, y1, 10, height + 1 ); diff --git a/Launcher2/Gui/Widgets/LauncherButtonWidget.cs b/Launcher2/Gui/Widgets/LauncherButtonWidget.cs index ce27275a9..24e89e3ae 100644 --- a/Launcher2/Gui/Widgets/LauncherButtonWidget.cs +++ b/Launcher2/Gui/Widgets/LauncherButtonWidget.cs @@ -35,7 +35,7 @@ namespace Launcher { DrawTextArgs args = new DrawTextArgs( text, font, true ); DrawBorder( drawer ); - if( Window.ClassicMode ) + if( Window.ClassicBackground ) DrawClassic( drawer, xOffset, yOffset ); else DrawNormal( drawer, xOffset, yOffset ); @@ -44,7 +44,7 @@ namespace Launcher { } void DrawBorder( IDrawer2D drawer ) { - FastColour backCol = Window.ClassicMode ? FastColour.Black : LauncherSkin.ButtonBorderCol; + FastColour backCol = Window.ClassicBackground ? FastColour.Black : LauncherSkin.ButtonBorderCol; drawer.Clear( backCol, X + 1, Y, Width - 2, border ); drawer.Clear( backCol, X + 1, Y + Height - border, Width - 2, border ); drawer.Clear( backCol, X, Y + 1, border, Height - 2 ); @@ -72,7 +72,7 @@ namespace Launcher { public void RedrawBackground( FastBitmap dst ) { if( Window.Minimised ) return; Rectangle rect = new Rectangle( X + border, Y + border, Width - border * 2, Height - border * 2 ); - if( Window.ClassicMode ) { + if( Window.ClassicBackground ) { FastColour foreCol = Active ? new FastColour( 126, 136, 191 ) : new FastColour( 111, 111, 111 ); Drawer2DExt.DrawNoise( dst, rect, foreCol, 8 ); } else { diff --git a/Launcher2/LauncherWindow.Background.cs b/Launcher2/LauncherWindow.Background.cs index 03259027b..e194c5b13 100644 --- a/Launcher2/LauncherWindow.Background.cs +++ b/Launcher2/LauncherWindow.Background.cs @@ -9,12 +9,16 @@ namespace Launcher { public sealed partial class LauncherWindow { - internal bool ClassicMode = false; + internal bool ClassicBackground = false; internal void TryLoadTexturePack() { Options.Load(); LauncherSkin.LoadFromOptions(); - ClassicMode = Options.GetBool( "mode-classic", false ); + if( Options.Get( "nostalgia-classicbg" ) != null ) + ClassicBackground = Options.GetBool( "nostalgia-classicbg", false ); + else + ClassicBackground = Options.GetBool( "mode-classic", false ); + string texDir = Path.Combine( Program.AppDirectory, "texpacks" ); string texPack = Options.Get( OptionsKey.DefaultTexturePack ) ?? "default.zip"; texPack = Path.Combine( texDir, texPack ); @@ -62,7 +66,7 @@ namespace Launcher { Framebuffer = new Bitmap( Width, Height ); } - if( ClassicMode ) { + if( ClassicBackground ) { using( FastBitmap dst = new FastBitmap( Framebuffer, true ) ) { ClearTile( 0, 0, Width, 48, elemSize, 128, 64, dst ); ClearTile( 0, 48, Width, Height - 48, 0, 96, 96, dst ); @@ -94,7 +98,7 @@ namespace Launcher { } public void ClearArea( int x, int y, int width, int height, FastBitmap dst ) { - if( ClassicMode ) { + if( ClassicBackground ) { ClearTile( x, y, width, height, 0, 96, 96, dst ); } else { FastColour col = LauncherSkin.BackgroundCol;