added editor WIP

This commit is contained in:
2026-01-18 14:59:44 +01:00
parent 281e4740a8
commit dc5b58d7d3
27 changed files with 2448 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
#include "SceneView.hpp"
TSE::EDITOR::SceneView::SceneView(TSE::GLFW::RenderTexture *frameBuffer) : GuiWindow("Scene", ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)
{
fb = frameBuffer;
}
void TSE::EDITOR::SceneView::Define()
{
ImGuiWindowFlags flags2 = ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar;
if(ImGui::BeginChild("##SceneChild", {0,0}, ImGuiChildFlags_None, flags2))
{
ImGui::Image(fb->GetTextureId(), {fb->width(), fb->height()},{0,1}, {1,0});
auto vec2 = ImGui::GetWindowSize();
if(fb->width() != vec2.x || fb->height() != vec2.y)
{
fb->SetSize({vec2.x, vec2.y});
}
}
ImGui::EndChild();
}