39 lines
759 B
C++
39 lines
759 B
C++
/*
|
|
* File name: paterns_menu.hpp
|
|
* Author: lejulien
|
|
* Date created: 01-01-1970 00:59:59
|
|
// Date modified: 12-01-2026 21:30:10
|
|
* ------
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
#include <context.hpp>
|
|
#include <vector>
|
|
#include <map>
|
|
#include <string>
|
|
|
|
namespace gol {
|
|
|
|
class PaternsMenu {
|
|
public:
|
|
PaternsMenu(std::shared_ptr<ctx>);
|
|
~PaternsMenu() = default;
|
|
void Toogle();
|
|
bool isOpen();
|
|
void display();
|
|
void refresh();
|
|
private:
|
|
bool loadPatern(std::string &path);
|
|
bool is_open_ = false;
|
|
std::shared_ptr<ctx> context_ = nullptr;
|
|
std::map<std::string,std::string> paterns_paths_list_;
|
|
std::vector<std::string> paterns_name_list_;
|
|
int patern_width_ = 0;
|
|
int patern_height_ = 0;
|
|
std::vector<uint32_t> loaded_patern_;
|
|
};
|
|
|
|
} // namespace gol
|