#include "GuiWindow.h"

TSE::EDITOR::GuiWindow::GuiWindow(const string &title, const ImGuiWindowFlags &flags)
{
    this->title = title;
    this->flags = flags;
}

TSE::EDITOR::GuiWindow::GuiWindow(const string &title, const Vector2 pos, const Vector2 size, const ImGuiWindowFlags &flags)
{
    this->title = title;
    this->pos = pos;
    this->size = size;
    this->flags = flags;
}

void TSE::EDITOR::GuiWindow::Render()
{
    if(enabled)
    {
        Begin();
        Define();
        End();
    }
}

void TSE::EDITOR::GuiWindow::Begin()
{
    ImGui::Begin(title.c_str(), &enabled, flags);
}

void TSE::EDITOR::GuiWindow::End()
{
    ImGui::End();
}
