open-story-teller/story-editor/src/window_base.cpp
2024-05-20 16:35:27 +02:00

31 lines
418 B
C++

#include "window_base.h"
#include "imgui.h"
WindowBase::WindowBase(const std::string &title)
: m_title(title)
{
}
bool WindowBase::BeginDraw()
{
bool ok = ImGui::Begin(m_title.c_str(), nullptr, m_windowFlags);
if (m_disabled)
{
ImGui::BeginDisabled();
}
return ok;
}
void WindowBase::EndDraw()
{
if (m_disabled)
{
ImGui::EndDisabled();
}
ImGui::End();
}