Adding more input handlers

This commit is contained in:
2023-05-17 19:41:48 +02:00
parent 4a84df7c3e
commit 7ec13a7020
7 changed files with 56 additions and 15 deletions

View File

@ -10,6 +10,11 @@ links{
"nfd"
}
targetdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}"
objdir "%{wks.location}/%{prj.name}/build/%{cfg.buildcfg}/intermediates/"
includedirs{
"../YoggieEngine/build/Debug",

View File

@ -31,7 +31,7 @@ class EditorLayer : public Layer {
public:
EditorLayer() :
EditorLayer() :
Layer(),
Logo("rsc/Yoggie.png"),
inspector(Selected),
@ -123,7 +123,6 @@ public:
bool OnKey(int key, int mode) override {
if (SceneisFocused) {
spdlog::info("update camera!");
if (key == YOGGIE_KEY_UP)
camera->Rotation.x += movement_speed;
@ -413,7 +412,7 @@ public:
// spdlog::info("{0}x{1}", ImGui::GetWindowWidth(), ImGui::GetWindowHeight());
SceneisFocused = ImGui::IsWindowFocused() || ImGui::IsWindowHovered();
ImGui::Image((ImTextureID)(intptr_t)renderer.getCurrentFrameBuffer().GetColourAttachment(),
ImVec2{(float)ImGui::GetWindowWidth(),(float)ImGui::GetWindowHeight()});
ImVec2{(float)ImGui::GetWindowWidth(),(float)ImGui::GetWindowHeight()},ImVec2{1,1}, ImVec2{0,0});