summaryrefslogtreecommitdiff
path: root/Penguloon/Scenes/LevelSelectionScene.cs
diff options
context:
space:
mode:
authoraldrikboy <aldrikboy@gmail.com>2017-12-11 22:02:13 +0100
committeraldrikboy <aldrikboy@gmail.com>2017-12-11 22:02:13 +0100
commitfd6fa4e5cebbe3edb65d50c78dcc8a97ce98ce64 (patch)
tree8950f6b9023e0b47e22e1cd4869ab76de0803f4c /Penguloon/Scenes/LevelSelectionScene.cs
parentc4c0f3c887d627b6432551e96009c7aeecd4cdd8 (diff)
First commit
Diffstat (limited to 'Penguloon/Scenes/LevelSelectionScene.cs')
-rw-r--r--Penguloon/Scenes/LevelSelectionScene.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/Penguloon/Scenes/LevelSelectionScene.cs b/Penguloon/Scenes/LevelSelectionScene.cs
new file mode 100644
index 0000000..4df627c
--- /dev/null
+++ b/Penguloon/Scenes/LevelSelectionScene.cs
@@ -0,0 +1,47 @@
+using System;
+using Penguloon.Controls;
+using Microsoft.Xna.Framework;
+
+namespace Penguloon.Scenes
+{
+ public class LevelSelectionScene : SceneBase
+ {
+ public LevelSelectionScene(Main main) : base(main)
+ {
+
+ }
+
+ public override void CreateControls()
+ {
+ Button btnStart = new Button(this,
+ new Vector2(10, 10),
+ StaticUIValues.MenuButtonSize, Main.Resources.GetString(Resource.String.LevelSelectionBack));
+
+ btnStart.OnClick += BtnStart_OnClick;
+
+ int levelSelectorPosY = (int)((StaticUIValues.ScreenViewport.Y - StaticUIValues.MenuButtonSize.Y) - StaticUIValues.LevelSelectorHeight);
+
+ LevelSelector levelSelector = new LevelSelector(this,
+ new Vector2(0, levelSelectorPosY), new Vector2(StaticUIValues.ScreenViewport.X, StaticUIValues.LevelSelectorHeight));
+
+ Controls.Add(levelSelector);
+ Controls.Add(btnStart);
+ }
+
+ private void BtnStart_OnClick(object sender, ClickArgs e)
+ {
+ SceneManager.SelectedScene = SelectedScene.Menu;
+ }
+
+ public override void Draw(float deltaTime)
+ {
+ // background
+ Main.SpriteBatch.Draw(ContentManager.GetTexture("UI/background"),
+ destinationRectangle: new Rectangle(0, 0, (int)StaticUIValues.ScreenViewport.X, (int)StaticUIValues.ScreenViewport.Y));
+
+ DrawSnowflakes();
+
+ base.Draw(deltaTime);
+ }
+ }
+} \ No newline at end of file