Add placeholder options for music, sound, and gui.png.

This commit is contained in:
UnknownShadow200 2015-11-25 18:57:01 +11:00
parent 5feff2b4df
commit b0dd9d0651
3 changed files with 20 additions and 5 deletions

View File

@ -24,13 +24,17 @@ namespace ClassicalSharp {
g.RefreshHud();
} ),
Make( -140, 50, "Clickable chat", Anchor.Centre, OnWidgetClick,
Make( -140, 50, "Use gui.png (WIP)", Anchor.Centre, OnWidgetClick,
g => g.UseGuiPng ? "yes" : "no",
(g, v) => game.UseGuiPng = v == "yes" ),
// Column 2
Make( 140, -100, "Clickable chat", Anchor.Centre, OnWidgetClick,
g => g.ClickableChat ? "yes" : "no",
(g, v) => { g.ClickableChat = v == "yes";
Options.Set( OptionsKey.ClickableChat, v == "yes" );
} ),
// Column 2
Make( 140, -50, "Chat scale", Anchor.Centre, OnWidgetClick,
g => g.ChatScale.ToString(),
(g, v) => { g.ChatScale = Single.Parse( v );
@ -64,10 +68,10 @@ namespace ClassicalSharp {
new RealValidator( 0.25f, 5f ),
new BooleanValidator(),
new BooleanValidator(),
new RealValidator( 0.25f, 5f ),
new IntegerValidator( 1, 30 ),
new BooleanValidator(),
new BooleanValidator(),
};
okayIndex = buttons.Length - 1;
}

View File

@ -15,6 +15,10 @@ namespace ClassicalSharp {
buttons = new ButtonWidget[] {
// Column 1
Make( -140, -150, "Use sound (WIP)", Anchor.Centre, OnWidgetClick,
g => g.UseSound ? "yes" : "no",
(g, v) => g.UseSound = v == "yes" ),
Make( -140, -100, "Show hover names", Anchor.Centre, OnWidgetClick,
g => g.Players.ShowHoveredNames ? "yes" : "no",
(g, v) => { g.Players.ShowHoveredNames = v == "yes";
@ -37,13 +41,17 @@ namespace ClassicalSharp {
// Column 2
!network.IsSinglePlayer ? null :
Make( 140, -150, "Singleplayer physics", Anchor.Centre, OnWidgetClick,
Make( 140, -200, "Singleplayer physics", Anchor.Centre, OnWidgetClick,
g => ((SinglePlayerServer)network).physics.Enabled ? "yes" : "no",
(g, v) => {
((SinglePlayerServer)network).physics.Enabled = v == "yes";
Options.Set( OptionsKey.SingleplayerPhysics, v == "yes" );
}),
Make( 140, -150, "Use music (WIP)", Anchor.Centre, OnWidgetClick,
g => g.UseMusic ? "yes" : "no",
(g, v) => g.UseMusic = v == "yes" ),
Make( 140, -100, "View bobbing", Anchor.Centre, OnWidgetClick,
g => g.ViewBobbing ? "yes" : "no",
(g, v) => { g.ViewBobbing = v == "yes";
@ -73,6 +81,7 @@ namespace ClassicalSharp {
buttons[2].Metadata = typeof(FpsLimitMethod);
validators = new MenuInputValidator[] {
new BooleanValidator(),
new BooleanValidator(),
new RealValidator( 0.1f, 50 ),
new EnumValidator(),
@ -82,6 +91,7 @@ namespace ClassicalSharp {
new BooleanValidator(),
new BooleanValidator(),
new BooleanValidator(),
new BooleanValidator(),
new IntegerValidator( 1, 100 ),
};
okayIndex = buttons.Length - 1;

View File

@ -75,7 +75,8 @@ namespace ClassicalSharp {
public int ChatLines = 12;
public bool ClickableChat, HideGui, ShowFPS = true;
internal float HudScale = 1.0f, ChatScale = 1.0f;
public bool ViewBobbing;
public bool ViewBobbing, UseGuiPng;
public bool UseSound, UseMusic;
public Animations Animations;
internal int CloudsTextureId, RainTextureId, SnowTextureId;