This commit is contained in:
Isuru Samarathunga
2025-11-11 09:24:14 +05:30
parent 67cb23d589
commit 9d6f525b81
33 changed files with 654 additions and 285 deletions

View File

@ -16,29 +16,25 @@
#pragma once
#include <UI/Base.hpp>
#include <UI/UI.hpp>
namespace ia::iae
{
class IView
{
protected:
PURE_VIRTUAL(VOID OnEvent(IN SDL_Event *event));
public:
PURE_VIRTUAL(VOID Initialize());
PURE_VIRTUAL(VOID Terminate());
PURE_VIRTUAL(VOID Render());
PURE_VIRTUAL(VOID Update());
public:
VOID SetIcon(IN PCCHAR icon)
{
m_icon = icon;
m_iconAndName = BuildString(m_icon, " ", m_name);
}
VOID SetName(IN CONST String &name)
{
m_name = name;
m_iconAndName = m_icon ? BuildString(m_icon, " ", m_name) : m_name;
}
VOID SetIcon(IN PCCHAR icon);
VOID SetName(IN CONST String &name);
VIRTUAL VOID ProcessEvent(IN SDL_Event *event);
public:
CONST String &Name() CONST
@ -66,14 +62,21 @@ namespace ia::iae
String m_name{};
PCCHAR m_icon{};
String m_iconAndName{};
public:
VIRTUAL ~IView()
{
}
};
VOID IView::PreRender()
{
m_extent = ImGui::GetWindowSize();
ImGui::BeginChild("##");
}
VOID IView::PostRender()
{
ImGui::EndChild();
}
} // namespace ia::iae