diff --git a/src/editor.rs b/src/editor.rs index a02f3fe..77ea49e 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -620,10 +620,20 @@ impl Editor { } Popup::PauseMenu => { let bounds = screen_centered_rect(d, 300, 400); - d.draw_rectangle_rec(bounds, BG_DARK); + d.draw_rectangle_rec(bounds, BG_MEDIUM); let x = bounds.x as i32; let y = bounds.y as i32; - d.draw_text("Menu", x + 5, y + 5, 30, Color::LIGHTBLUE); + d.draw_text("Menu", x + 10, y + 10, 30, Color::LIGHTBLUE); + if text_button(d, &self.mouse, x + 10, y + 40, 280, "Resume") { + self.popup = Popup::None; + } + if text_button(d, &self.mouse, x + 10, y + 80, 280, "Save") { + self.exit_state = ExitState::Save; + self.popup = Popup::None; + } + if text_button(d, &self.mouse, x + 10, y + 120, 280, "Exit to main menu") { + self.exit_state = ExitState::ExitAndSave; + } } Popup::None => (), }