Initial editor commit

- Add Entity Tree View used to select entities to be modified
- Add Entity View used to Add/Remove/Edit Components of the Entity
- Add Asset View which lists all available assets
This commit is contained in:
Thraix
2023-07-18 11:58:55 +02:00
parent 65a86bd5a2
commit ca61bae014
22 changed files with 485 additions and 31 deletions
+6 -1
View File
@@ -79,7 +79,11 @@ namespace Copium
case EventType::ViewportResize:
{
const ViewportResize& viewportResizeEvent = static_cast<const ViewportResize&>(event);
AssetManager::GetAsset<Framebuffer>(framebuffer).Resize(viewportResizeEvent.GetViewport().GetSize().x, viewportResizeEvent.GetViewport().GetSize().y);
glm::vec2 size = viewportResizeEvent.GetViewport().GetSize();
if (size.x == 0 || size.y == 0)
return EventResult::Continue;
AssetManager::GetAsset<Framebuffer>(framebuffer).Resize(size.x, size.y);
descriptorSetImGui->SetSampler(AssetManager::GetAsset<Framebuffer>(framebuffer).GetColorAttachment(), 0);
return EventResult::Continue;
@@ -157,6 +161,7 @@ namespace Copium
// TODO: Move this logic elsewhere
Vulkan::GetImGuiInstance().Begin();
ImGui::ShowDemoWindow();
ImGui::SetNextWindowPos(ImVec2{0, 0});
ImGui::SetNextWindowSize(ImVec2{(float)Vulkan::GetWindow().GetWidth(), (float)Vulkan::GetWindow().GetHeight()});