diff --git a/source/code/MenuSystem.cpp b/source/code/MenuSystem.cpp index f22e7f5..3ecfc61 100644 --- a/source/code/MenuSystem.cpp +++ b/source/code/MenuSystem.cpp @@ -59,15 +59,6 @@ sago::SagoTextField* ButtonGfx::getLabel(const std::string& text) { return labels[text].get(); } -Button::Button() { - label = ""; - marked = false; - action = nullptr; - popOnRun = false; -} - -Button::~Button() { -} Button::Button(const Button& b) : action{b.action}, label{b.label}, marked{b.marked} { } diff --git a/source/code/MenuSystem.h b/source/code/MenuSystem.h index 024bf3a..02d643b 100644 --- a/source/code/MenuSystem.h +++ b/source/code/MenuSystem.h @@ -67,10 +67,10 @@ public: int x = 0; int y = 0; - Button(); + Button() = default; Button(const Button& b); Button& operator=(const Button& other); - virtual ~Button(); + virtual ~Button() = default; //Set the text to write on the button @@ -107,10 +107,10 @@ public: Menu(SDL_Renderer *screen); Menu(SDL_Renderer *screen, const std::string& title, bool isSubmenu); virtual ~Menu() {} - + //Add a button to the menu void addButton(Button *b); - + bool IsActive() override; void Draw(SDL_Renderer* target) override; void ProcessInput(const SDL_Event& event, bool &processed) override;