Changed selected type
Moving away from using the pure ENTT library types and starting to use my own
This commit is contained in:
@ -3,11 +3,14 @@
|
||||
|
||||
void Inspector::Draw()
|
||||
{
|
||||
|
||||
}
|
||||
if (selected.isValid()) {
|
||||
AddComponentDropDown();
|
||||
ShowComponents();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void Inspector::AddComponentDropDown(YoggieEngine::Entity& selected)
|
||||
void Inspector::AddComponentDropDown()
|
||||
{
|
||||
static char* names[] = { "Script Component", "Camera Component", "Light Component" };
|
||||
if (ImGui::Button("Add Component"))
|
||||
@ -28,7 +31,7 @@ void Inspector::AddComponentDropDown(YoggieEngine::Entity& selected)
|
||||
}
|
||||
|
||||
|
||||
void Inspector::ShowComponents(YoggieEngine::Entity& selected)
|
||||
void Inspector::ShowComponents()
|
||||
{
|
||||
auto component = selected.GetComponent<YoggieEngine::IdentifierComponent>();
|
||||
ImGui::InputText("Name:", (char*)component.name.c_str(), component.name.size() * sizeof(char), ImGuiInputTextFlags_ReadOnly);
|
||||
|
Reference in New Issue
Block a user