From 10c92d7f54759d9356ac948f6d019a82e40e3f4d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Sat, 13 Mar 2021 11:34:59 -0500 Subject: Added pause menu open and close sound #7 --- src/menu.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/menu.h') diff --git a/src/menu.h b/src/menu.h index 967b384..528f8c8 100644 --- a/src/menu.h +++ b/src/menu.h @@ -16,6 +16,7 @@ struct MenuItem { MenuType type = MenuType::Command; std::string text; std::function activationFunction; + bool playSfx = false; }; class MenuBuilder { @@ -24,6 +25,7 @@ public: MenuBuilder& Command(std::string text) { result_.type = MenuType::Command; result_.text = std::move(text); + result_.playSfx = true; return *this; } @@ -32,6 +34,11 @@ public: return *this; } + MenuBuilder& SkipSoundEffect() { + result_.playSfx = false; + return *this; + } + MenuItem Build() const { return result_; } -- cgit 1.4.1