settings_menu: Create a dedicated class for the settings
This commit is contained in:
46
includes/settings_menu.hpp
Normal file
46
includes/settings_menu.hpp
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* File name: settings_menu.hpp
|
||||
* Author: lejulien
|
||||
* Date created: 01-01-1970 00:59:59
|
||||
// Date modified: 12-01-2026 22:16:29
|
||||
* ------
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <context.hpp>
|
||||
|
||||
namespace gol {
|
||||
|
||||
class SettingsMenu {
|
||||
public:
|
||||
SettingsMenu(std::shared_ptr<ctx> context);
|
||||
~SettingsMenu() = default;
|
||||
void update();
|
||||
void display();
|
||||
bool isOpen();
|
||||
void Toogle();
|
||||
// Getter/Setters
|
||||
int getFPS();
|
||||
void setFPS(int);
|
||||
int getCellSize();
|
||||
void setCellSize(int);
|
||||
int getWidth();
|
||||
void setWidth(int);
|
||||
int getHeight();
|
||||
void setHeight(int);
|
||||
private:
|
||||
std::shared_ptr<ctx> context_ = nullptr;
|
||||
int fps_ctrl_ = false;
|
||||
int cell_size_ctrl_ = false;
|
||||
bool settings_window_ = 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