Skip to content

Commit

Permalink
Added keys
Browse files Browse the repository at this point in the history
  • Loading branch information
denis authored and denis committed Jul 30, 2024
1 parent 509e22d commit 7c93454
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion GUI/src/ImGuiCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ void Prisma::ImGuiCamera::keyboardUpdate(void* windowData)
if (glfwGetKey(window, Prisma::KEY_C) == GLFW_PRESS) {
//Prisma::PrismaFunc()->closeWindow();
}
if (glfwGetKey(window, Prisma::KEY_U) == GLFW_PRESS) {
if (glfwGetKey(window, Prisma::KEY_DELETE) == GLFW_PRESS) {
if (m_currentSelect) {
m_currentSelect->parent()->removeChild(m_currentSelect->uuid());
m_currentSelect = nullptr;
Expand Down
5 changes: 3 additions & 2 deletions GUI/src/ImguiDebug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ void Prisma::ImguiDebug::drawGui()
ImGui::EndMainMenuBar();
}
m_initOffset = size.y;
m_model = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, m_translate - (m_initOffset)/(float)m_height, 0.0f)) * glm::scale(glm::mat4(1.0f), glm::vec3(m_scale));
m_model = glm::translate(glm::mat4(1.0f), glm::vec3(0.0f, m_translate, 0.0f)) * glm::scale(glm::mat4(1.0f), glm::vec3(m_scale));

bool isOpen = true;
if (!m_run) {
Expand Down Expand Up @@ -283,7 +283,8 @@ void Prisma::ImguiDebug::start()

void Prisma::ImguiDebug::close()
{
m_imguiCamera.constraints({ m_translate * m_width / 2,m_initOffset,m_translate * m_width / 2 + m_scale * m_width,m_initOffset + m_height * m_scale,meshInfo.updateMesh(),ImGuizmo::IsOver(),m_scale });

m_imguiCamera.constraints({ m_translate * m_width / 2,0,m_translate * m_width / 2 + m_scale * m_width,m_height * m_scale,meshInfo.updateMesh(),ImGuizmo::IsOver(),m_scale });
ImGui::Render();
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
if (!m_run) {
Expand Down

0 comments on commit 7c93454

Please sign in to comment.