First ECS test in the editor working (Tag component editable using a temp-testing entity in the editor)
parent
e237d0dcb5
commit
9dede57b96
@ -0,0 +1,27 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* File - component_guis.cpp
|
||||||
|
* Author - Joey Pollack
|
||||||
|
* Date - 2022/06/01 (y/m/d)
|
||||||
|
* Mod Date - 2022/06/01 (y/m/d)
|
||||||
|
* Description - Functions to render component editing GUIs
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#include "component_guis.h"
|
||||||
|
#include <editor/editor.h>
|
||||||
|
#include <utils/logger.h>
|
||||||
|
#include <dearimgui/imgui.h>
|
||||||
|
|
||||||
|
namespace lunarium { namespace editor
|
||||||
|
{
|
||||||
|
void CompGui::RenderTagComp(TagComponent& comp)
|
||||||
|
{
|
||||||
|
ImGui::Text("Tag:");
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::InputText("##Tag", comp.Info.data(), comp.Info.capacity())
|
||||||
|
}
|
||||||
|
|
||||||
|
void CompGui::RenderTransformComp(TransformComponent& comp)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
/******************************************************************************
|
||||||
|
* File - component_guis.h
|
||||||
|
* Author - Joey Pollack
|
||||||
|
* Date - 2022/06/01 (y/m/d)
|
||||||
|
* Mod Date - 2022/06/01 (y/m/d)
|
||||||
|
* Description - Functions to render component editing GUIs
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
#ifndef LUNARIUM_COMPONENT_GUIS_H_
|
||||||
|
#define LUNARIUM_COMPONENT_GUIS_H_
|
||||||
|
|
||||||
|
#include <world/components.h>
|
||||||
|
|
||||||
|
namespace lunarium { namespace editor
|
||||||
|
{
|
||||||
|
class CompGui
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void RenderTagComp(TagComponent& comp);
|
||||||
|
static void RenderTransformComp(TransformComponent& comp);
|
||||||
|
};
|
||||||
|
}}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // LUNARIUM_COMPONENT_GUIS_H_
|
||||||
Loading…
Reference in New Issue