/****************************************************************************** * File - properties_view.h * Author - Joey Pollack * Date - 2022/01/26 (y/m/d) * Mod Date - 2022/01/26 (y/m/d) * Description - Displayes the properties and components(?) of the selected * object. ******************************************************************************/ #include "properties_view.h" #include #include #include #include #include namespace lunarium { namespace editor { PropertiesView::PropertiesView() : Panel("Properties", PanelDockZone::DDZ_RIGHT, true, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar), mpSelectedAsset(nullptr), mpSelectedEntity(nullptr) { } void PropertiesView::DoFrame() { if (mpSelectedEntity) { // TODO: iterate through components if (mpSelectedEntity->HasComponent()) { CompGui::RenderTagComp(mpSelectedEntity->GetComponent()); } } } void PropertiesView::SetSelection(Entity* pEntity) { mpSelectedAsset = nullptr; mpSelectedEntity = pEntity; } void PropertiesView::SetSelection(EditorAsset* pAsset) { mpSelectedEntity = nullptr; mpSelectedAsset = pAsset; } }}