From 3ef2d6d31f2bf923cb1d3107ff7fcc1fef792c5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20=E2=80=98Touky=E2=80=99=20Huet?= Date: Wed, 15 Apr 2015 04:04:18 +0000 Subject: [PATCH] small MeshViewer tweak --- doc/samples/meshviewer/meshviewer.cpp | 3 ++ doc/samples/meshviewer/meshviewer.h | 2 +- doc/samples/meshviewer/meshviewer.vcxproj | 38 +++++++++++------------ 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/doc/samples/meshviewer/meshviewer.cpp b/doc/samples/meshviewer/meshviewer.cpp index ed66e778..afdb97cd 100644 --- a/doc/samples/meshviewer/meshviewer.cpp +++ b/doc/samples/meshviewer/meshviewer.cpp @@ -295,6 +295,7 @@ void MeshViewer::TickGame(float seconds) m_menu_mesh_names_char << m_menu_mesh_names_str[i].C(); ImGuiIO& io = ImGui::GetIO(); + //CAMERA UI --------------------------------------------------------------- ImGui::Begin("Camera Setup" /*, &default_open, ImGuiWindowFlags_AlwaysAutoResize*/); { ImGui::Text("Hello, world!"); @@ -305,6 +306,8 @@ void MeshViewer::TickGame(float seconds) ImGui::SliderFloat("Cam Distance", &m_menu_cam_pos.x, 0.1f, 30.f); ImGui::SliderFloat("Cam H-axis", &m_menu_cam_pos.y, -180.f, 180.f); ImGui::SliderFloat("Cam V-axis", &m_menu_cam_pos.z, -89.f, 89.f); + ImGui::Combo("Scene Setup", &m_menu_mesh_idx, (const char**)m_menu_mesh_names_char.data(), (int)m_menu_mesh_names_char.count()); + ImGui::ListBox("Meshes", &m_menu_mesh_idx, (const char**)m_menu_mesh_names_char.data(), (int)m_menu_mesh_names_char.count()); //ImGui::ListBox() } diff --git a/doc/samples/meshviewer/meshviewer.h b/doc/samples/meshviewer/meshviewer.h index 3e06db04..5911a983 100644 --- a/doc/samples/meshviewer/meshviewer.h +++ b/doc/samples/meshviewer/meshviewer.h @@ -218,7 +218,7 @@ class MeshViewer : public WorldEntity { typedef WorldEntity super; public: - MeshViewer(char const *file_name = "data/meshviewer.easymesh.lua"); + MeshViewer(char const *file_name = "../data/meshviewer.easymesh.lua"); ~MeshViewer(); void Start(); diff --git a/doc/samples/meshviewer/meshviewer.vcxproj b/doc/samples/meshviewer/meshviewer.vcxproj index 30062cae..bf1d1c4b 100644 --- a/doc/samples/meshviewer/meshviewer.vcxproj +++ b/doc/samples/meshviewer/meshviewer.vcxproj @@ -35,8 +35,8 @@ - - + + @@ -50,64 +50,64 @@ - + true true - + true - + true - + true true - + true true - + true true - + true true - + true true - + true true - + true true - + true true - + true true - + true true - - + + - - + + {7CE9FE12-E4AB-4A22-90D4-2C15F0C30D4E}