38 lines
720 B
C++
38 lines
720 B
C++
/*
|
|
* File name: control_menu.hpp
|
|
* Author: lejulien
|
|
* Date created: 10-01-2026 22:00:33
|
|
// Date modified: 12-01-2026 22:18:26
|
|
* ------
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
#include <context.hpp>
|
|
#include <types.hpp>
|
|
|
|
namespace gol {
|
|
|
|
class ControlMenu {
|
|
public:
|
|
ControlMenu(std::shared_ptr<ctx> context);
|
|
~ControlMenu() = default;
|
|
void update();
|
|
void display();
|
|
private:
|
|
std::shared_ptr<ctx> context_;
|
|
public: // Keep those public for easy access
|
|
MenuState menu_state_ = MenuState::NONE;
|
|
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 paterns_ctrl_ = false;
|
|
};
|
|
|
|
} // namespace gol
|