paterns_menu: Move it to it's own class
This commit is contained in:
11
src/main.cpp
11
src/main.cpp
@@ -24,6 +24,7 @@
|
||||
#include <settings_menu.hpp>
|
||||
#include <selection_menu.hpp>
|
||||
#include <selection.hpp>
|
||||
#include <paterns_menu.hpp>
|
||||
|
||||
int main(int ac, char **av) {
|
||||
std::shared_ptr<gol::ctx> context = std::make_shared<gol::ctx>();
|
||||
@@ -96,6 +97,7 @@ int main(int ac, char **av) {
|
||||
context->render = std::make_shared<Render>(context->settings_menu->getCellSize());
|
||||
context->selection_menu = std::make_shared<gol::SelectionMenu>(context);
|
||||
context->selection = std::make_shared<gol::Selection>(context);
|
||||
context->paterns_menu = std::make_shared<gol::PaternsMenu>();
|
||||
|
||||
// Speed handling values
|
||||
float sim_speed = 1.0f;
|
||||
@@ -145,14 +147,7 @@ int main(int ac, char **av) {
|
||||
// Start ImGui frame
|
||||
rlImGuiBegin();
|
||||
context->control_menu->display();
|
||||
if (context->control_menu->paterns_ctrl_) {
|
||||
ImGuiWindowFlags paterns_flags =
|
||||
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize;
|
||||
ImGui::SetNextWindowSize(ImVec2(150, 200), ImGuiCond_Always);
|
||||
ImGui::Begin("paterns", &context->control_menu->paterns_ctrl_, paterns_flags);
|
||||
ImGui::Button("refresh");
|
||||
ImGui::End();
|
||||
}
|
||||
context->paterns_menu->display();
|
||||
context->settings_menu->display();
|
||||
context->selection_menu->display();
|
||||
// End ImGui frame
|
||||
|
||||
Reference in New Issue
Block a user