paterns_menu: list and display paterns

This commit is contained in:
2026-01-13 17:11:49 +01:00
parent c4725847cc
commit 3d89ec74c9
4 changed files with 59 additions and 4 deletions

View File

@@ -8,17 +8,31 @@
#pragma once
#include <memory>
#include <context.hpp>
#include <vector>
#include <map>
#include <string>
namespace gol {
class PaternsMenu {
public:
PaternsMenu() = default;
PaternsMenu(std::shared_ptr<ctx>);
~PaternsMenu() = default;
void Toogle();
bool isOpen();
void display();
void refresh();
private:
void 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