YoggieEngine/Editor/src/EditorWindow.h

26 lines
420 B
C
Raw Normal View History

#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(), false, flags);
Draw();
ImGui::End();
}
~EditorWindow() = default;
protected:
std::string name;
private:
ImGuiWindowFlags_ flags;
virtual void Draw() = 0;
};