settings_menu: Create a dedicated class for the settings
This commit is contained in:
@@ -2,12 +2,14 @@
|
||||
* File name: control_menu.hpp
|
||||
* Author: lejulien
|
||||
* Date created: 10-01-2026 22:00:33
|
||||
// Date modified: 10-01-2026 22:45:10
|
||||
// Date modified: 12-01-2026 22:18:26
|
||||
* ------
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <context.hpp>
|
||||
#include <types.hpp>
|
||||
|
||||
@@ -15,28 +17,21 @@ namespace gol {
|
||||
|
||||
class ControlMenu {
|
||||
public:
|
||||
ControlMenu(ctx context);
|
||||
ControlMenu(std::shared_ptr<ctx> context);
|
||||
~ControlMenu() = default;
|
||||
void update();
|
||||
void display();
|
||||
private:
|
||||
ctx context_;
|
||||
std::shared_ptr<ctx> context_;
|
||||
public: // Keep those public for easy access
|
||||
MenuState menu_state_ = MenuState::NONE;
|
||||
int fps_ctrl_ = false;
|
||||
int cell_size_ctrl_ = false;
|
||||
bool play_ctrl_ = true;
|
||||
bool step_ctrl_ = false;
|
||||
bool step_back_ctrl_ = false;
|
||||
bool rand_ctrl_ = false;
|
||||
bool edit_ctrl_ = false;
|
||||
bool clear_ctrl_ = false;
|
||||
bool settings_window_ = false;
|
||||
bool paterns_ctrl_ = false;
|
||||
int width_ctrl_ = false;
|
||||
int height_ctrl_ = false;
|
||||
bool dark_theme_ctrl_ = false;
|
||||
bool apply_ctrl_ = false;
|
||||
};
|
||||
|
||||
} // namespace gol
|
||||
|
||||
Reference in New Issue
Block a user