Resource management refactor - added custom file resolver + RID

This commit is contained in:
antopilo
2025-01-18 17:51:49 -05:00
parent ab534fe929
commit 89ebc5d012
41 changed files with 1147 additions and 474 deletions

View File

@@ -58,7 +58,23 @@ public:
ImGui::TableNextColumn();
const char* lightTypes[] = { "Directional", "Point", "Spot" };
ComponentDropDown(lightTypes, Nuake::LightType, component.Type)
const char* current_item = lightTypes[(int)component.Type]; \
if (ImGui::BeginCombo("Type", current_item)) \
{ \
for (int n = 0; n < IM_ARRAYSIZE(lightTypes); n++) \
{ \
bool is_selected = (current_item == lightTypes[n]); \
if (ImGui::Selectable(lightTypes[n], is_selected)) \
{ \
current_item = lightTypes[n]; \
component.Type = (Nuake::LightType)n; \
} \
if (is_selected) \
ImGui::SetItemDefaultFocus(); \
} \
ImGui::EndCombo(); \
}
//ComponentDropDown(lightTypes, Nuake::LightType, component.Type)
ImGui::TableNextColumn();
ComponentTableReset(component.Type, Nuake::LightType::Point);