pretty property panel components
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define SCENE_HIERARCHY_HPP
|
||||
|
||||
#include "imgui.h"
|
||||
#include <array>
|
||||
#include <open_engine.hpp>
|
||||
|
||||
namespace OpenEngine {
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user