paterns_menu: Move it to it's own class
This commit is contained in:
35
src/paterns_menu.cpp
Normal file
35
src/paterns_menu.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* File name: paterns_menu.cpp
|
||||
* Author: lejulien
|
||||
* Date created: 01-01-1970 00:59:59
|
||||
// Date modified: 12-01-2026 21:30:10
|
||||
* ------
|
||||
*/
|
||||
|
||||
#include <paterns_menu.hpp>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <raylib.h>
|
||||
#include <rlImGui.h>
|
||||
|
||||
namespace gol {
|
||||
|
||||
void PaternsMenu::Toogle() {
|
||||
is_open_ = !is_open_;
|
||||
}
|
||||
|
||||
bool PaternsMenu::isOpen() {
|
||||
return is_open_;
|
||||
}
|
||||
|
||||
void PaternsMenu::display() {
|
||||
if (is_open_) {
|
||||
ImGuiWindowFlags paterns_flags = ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize;
|
||||
ImGui::SetNextWindowSize(ImVec2(150, 200), ImGuiCond_Always);
|
||||
ImGui::Begin("paterns", &is_open_, paterns_flags);
|
||||
ImGui::Button("refresh");
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace gol
|
||||
Reference in New Issue
Block a user