ADD settings menu to main game with go back feature

This commit is contained in:
2025-04-21 12:27:02 +02:00
parent 69cae0044a
commit 6b6532031b
6 changed files with 48 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ class SettingsMenu(GameState):
super().__init__(switch_state_callback, context)
# Buttons
self.back_button = Button(10, 10, 50, 50, lambda: self.switch_state("start_menu"))
self.back_button = Button(10, 10, 50, 50, lambda: self.switch_state(self.context["previous_states"].pop()))
self.back_button.set_text("Back")
self.show_yaw_text = self.font.render("Show Yaw: ", True, (255, 255, 255))