diff options
Diffstat (limited to 'Penguloon/Controls/IngameOptions.cs')
| -rw-r--r-- | Penguloon/Controls/IngameOptions.cs | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/Penguloon/Controls/IngameOptions.cs b/Penguloon/Controls/IngameOptions.cs index f59379d..0e2616c 100644 --- a/Penguloon/Controls/IngameOptions.cs +++ b/Penguloon/Controls/IngameOptions.cs @@ -25,6 +25,12 @@ namespace Penguloon.Controls public MuteButton BtnMute { get; set; } + public Checkbox CheckboxAutoStart { get; set; } + + Vector2 BtnSize; + Vector2 AutoStartTextPos; + string autoStartText; + public IngameOptions(SceneBase parentScene, Vector2 position, Vector2 size) : base(parentScene, position, size) { this.DrawText = false; @@ -32,7 +38,7 @@ namespace Penguloon.Controls this.BackgroundPressed = ContentManager.GetTexture("UI/optionsMenuBackground"); this.BackgroundDisabled = ContentManager.GetTexture("UI/optionsMenuBackground"); - Vector2 BtnSize = new Vector2(Size.X - 90, StaticUIValues.IngameUIPlayButtonHeight); + BtnSize = new Vector2(Size.X - 90, StaticUIValues.IngameUIPlayButtonHeight); Vector2 MsgBoxSize = new Vector2(900, 550); BtnMute = new MuteButton(parentScene, @@ -49,7 +55,18 @@ namespace Penguloon.Controls QuitConfirmationBox = new MessageBox(parentScene, new Vector2((StaticUIValues.ScreenViewport.X / 2) - (MsgBoxSize.X / 2), (StaticUIValues.ScreenViewport.Y / 2) - (MsgBoxSize.Y / 2)), - MsgBoxSize, parentScene.Main.Resources.GetString(Resource.String.IngameOptionsQuitConfirmation)); + MsgBoxSize, parentScene.Main.Resources.GetString(Resource.String.IngameOptionsQuitConfirmation)); + + CheckboxAutoStart = new Checkbox(parentScene, + new Vector2(position.X + (Size.X / 2) - (BtnSize.X / 2) + 20 + StaticUIValues.MenuButtonSize.Y, Position.Y + Size.Y - (50 * 2) - (BtnSize.Y * 2)), + new Vector2(StaticUIValues.MenuButtonSize.Y, StaticUIValues.MenuButtonSize.Y)); + + Font = ContentManager.GetFont(StaticUIValues.IngameFont); + + AutoStartTextPos = new Vector2(Position.X + (Size.X / 2) - (BtnSize.X / 2) + 20 + StaticUIValues.MenuButtonSize.Y + 20 + StaticUIValues.MenuButtonSize.Y, + Position.Y + Size.Y - (50 * 2) - (BtnSize.Y * 2) + (StaticUIValues.MenuButtonSize.Y / 2) - (Font.MeasureString("boeit niet").Y / 2)); + + autoStartText = parentScene.Main.Resources.GetString(Resource.String.IngameOptionsAutoStart); BtnContinue.OnClick += BtnContinue_OnClick; BtnQuit.OnClick += BtnQuit_OnClick; @@ -102,6 +119,11 @@ namespace Penguloon.Controls BtnContinue.Draw(deltaTime); BtnQuit.Draw(deltaTime); BtnMute.Draw(deltaTime); + CheckboxAutoStart.Draw(deltaTime); + + ParentScene.DrawText(Font, "Auto Start", + AutoStartTextPos, new Vector2(), TextAllignment.LeftTop, Color.White, Color.Gray, 2); + QuitConfirmationBox.Draw(deltaTime); } @@ -120,6 +142,7 @@ namespace Penguloon.Controls BtnContinue.Update(deltaTime, touchLocations); BtnQuit.Update(deltaTime, touchLocations); BtnMute.Update(deltaTime, touchLocations); + CheckboxAutoStart.Update(deltaTime, touchLocations); } } }
\ No newline at end of file |
