My entry to Ludum Dare 53
at master 39 lines 958 B view raw
1namespace LD53; 2 3class PauseMenu : Scene 4{ 5 public PauseMenu(int width, int height, string id) : base(width, height, id) 6 { 7 } 8 9 public override void Awake() 10 { 11 SetClearColor(255, 234, 210, 100); 12 } 13 14 public override void Sleep() 15 { 16 17 } 18 19 public override void Update() 20 { 21 new Texture("Images/Logo.png") 22 .Position(new(WindowSize.X / 2, 30)) 23 .Center(Center.Middle) 24 .Render(); 25 26 27 LD.DrawButton(new(WindowSize.X / 2 - (4 * 2 + 2), 60), "Resume", Mouse.Position, () => { 28 SceneHandler.Unload("PauseMenu"); 29 }); 30 31 LD.DrawButton(new(WindowSize.X / 2 - (4 * 2 + 2), 72), "Quit", Mouse.Position, () => { 32 SceneHandler.Unload("PauseMenu"); 33 SceneHandler.Unload("MainScene"); 34 SceneHandler.Load("MainMenu"); 35 }); 36 37 Draw.Rectangle(new(0, 0, WindowSize.X, WindowSize.Y), new(235, 214, 190, 255)); 38 } 39}