pretty property panel components

This commit is contained in:
Erris
2026-02-17 16:34:20 +01:00
parent d4c420d5b4
commit e0396fedd1
11 changed files with 151 additions and 64 deletions

View File

@@ -27,16 +27,16 @@ namespace OpenEngine {
{
auto delta = Time::DeltaTime();
auto& transform = GetComponent<TransformComponent>();
auto& position = GetComponent<TransformComponent>().translation;
if (Input::IsKeyPressed(KeyCode::Up))
transform.transform[3][1] += 5.0 * delta;
position.y += 5.0 * delta;
if (Input::IsKeyPressed(KeyCode::Down))
transform.transform[3][1] -= 5.0 * delta;
position.y -= 5.0 * delta;
if (Input::IsKeyPressed(KeyCode::Right))
transform.transform[3][0] += 5.0 * delta;
position.x += 5.0 * delta;
if (Input::IsKeyPressed(KeyCode::Left))
transform.transform[3][0] -= 5.0 * delta;
position.x -= 5.0 * delta;
};
void OnDestroy()

View File

@@ -2,6 +2,7 @@
#define SCENE_HIERARCHY_HPP
#include "imgui.h"
#include <array>
#include <open_engine.hpp>
namespace OpenEngine {

View File

@@ -1,8 +1,7 @@
#include "open_engine/scene/components.hpp"
#include <cstdint>
#include <cstring>
#include <panels/scene_hierarchy.hpp>
#include <cstring>
#include <cstdint>
#include <imgui.h>
namespace OpenEngine {
@@ -137,14 +136,3 @@ namespace OpenEngine {
DrawComponentDrawer<CameraComponent>(entity, "Camera");
}
}
/*
if (ImGui::BeginPopupContextWindow(0, ImGuiPopupFlags_MouseButtonRight | ImGuiPopupFlags_NoOpenOverItems))
{
if (ImGui::MenuItem("Create Empty Entity"))
{
// m_Context->CreateEntity("Empty Entity");
}
ImGui::EndPopup();
}
*/