Files
YoggieEngine/Editor/src/EditorWindow.h
Nigel Barink 95f77209cf Fixing lvalue errors on linux build
nfd is not yet linking on Linux
2023-05-13 21:33:57 +02:00

27 lines
425 B
C++

#pragma once
#include <imgui.h>
#include <string>
class EditorWindow {
public:
EditorWindow (const std::string& name, ImGuiWindowFlags_ flags = ImGuiWindowFlags_None ) : name(name) , flags(flags) {}
void Update()
{
ImGui::Begin(name.c_str(), nullptr, flags);
Draw();
ImGui::End();
}
~EditorWindow() = default;
protected:
std::string name;
private:
ImGuiWindowFlags_ flags;
virtual void Draw() = 0;
};