Reactivated docks of the different modules

simple_math_single_header
Martin Felis 2017-07-06 11:28:27 +02:00
parent 7deddf3397
commit aca4af5f6a
2 changed files with 13 additions and 12 deletions

View File

@ -11,6 +11,7 @@
#include "RuntimeModule.h" #include "RuntimeModule.h"
#include "Globals.h" #include "Globals.h"
#include "modules/RenderModule.h" #include "modules/RenderModule.h"
#include "imgui_dock.h"
#include "Serializer.h" #include "Serializer.h"
#include "Timer.h" #include "Timer.h"
@ -45,6 +46,7 @@ const float cCharacterHeight = 1.8f;
const float cCharacterWidth = 1.f; const float cCharacterWidth = 1.f;
const char* cRigModelFile = "data/models/model.lua"; const char* cRigModelFile = "data/models/model.lua";
const char* cAnimFile = "data/models/anim.csv"; const char* cAnimFile = "data/models/anim.csv";
static bool sCharacterDock = true;
static VectorNf sRigQ; static VectorNf sRigQ;
Quaternion offset_quat; Quaternion offset_quat;
@ -567,7 +569,7 @@ void ShowCharacterPropertiesWindow (CharacterEntity* character) {
ImGui::SetNextWindowSize (ImVec2(600.f, 300.0f), ImGuiSetCond_Once); ImGui::SetNextWindowSize (ImVec2(600.f, 300.0f), ImGuiSetCond_Once);
ImGui::SetNextWindowPos (ImVec2(400.f, 16.0f), ImGuiSetCond_Once); ImGui::SetNextWindowPos (ImVec2(400.f, 16.0f), ImGuiSetCond_Once);
// if(ImGui::BeginDock("Character")) { if (ImGui::BeginDock("Character", &sCharacterDock)) {
if (ImGui::Button ("Reset")) { if (ImGui::Button ("Reset")) {
character->Reset(); character->Reset();
@ -673,10 +675,9 @@ void ShowCharacterPropertiesWindow (CharacterEntity* character) {
} }
ImGui::TreePop(); ImGui::TreePop();
} }
// } }
ImGui::EndDock();
// ImGui::EndDock();
} }
static struct module_state *module_init() { static struct module_state *module_init() {

View File

@ -45,9 +45,9 @@ typedef Vector3f Vector3f;
typedef MatrixNNf MatrixNNf; typedef MatrixNNf MatrixNNf;
typedef VectorNf VectorNf; typedef VectorNf VectorNf;
static bool show_scene0 = true; static bool sDockInfoDock = true;
static bool show_scene1 = true; static bool sSceneDock = true;
static bool show_scene2 = true; static bool sRenderDock = true;
struct Renderer; struct Renderer;
@ -1710,7 +1710,7 @@ void Renderer::paintGL() {
} }
} }
// if (ImGui::BeginDock("Render Settings")) { if (ImGui::BeginDock("Render Settings"), &sRenderDock) {
if(ImGui::DragFloat3 ("Light0 Pos", lights[0].pos.data(), 1.0f, -10.0f, 10.0f)) { if(ImGui::DragFloat3 ("Light0 Pos", lights[0].pos.data(), 1.0f, -10.0f, 10.0f)) {
} }
@ -1741,9 +1741,9 @@ void Renderer::paintGL() {
0.10f 0.10f
); );
} }
// } }
// ImGui::EndDock(); ImGui::EndDock();
// Advance to next frame. Rendering thread will be kicked to // Advance to next frame. Rendering thread will be kicked to
// process submitted rendering primitives. // process submitted rendering primitives.
@ -1772,12 +1772,12 @@ void Renderer::DrawGui() {
ImGui::End(); ImGui::End();
} }
if (ImGui::BeginDock("Docks", &show_scene0)) { if (ImGui::BeginDock("Dock Info", &sDockInfoDock)) {
ImGui::Print(); ImGui::Print();
} }
ImGui::EndDock(); ImGui::EndDock();
if (ImGui::BeginDock("Scene", &show_scene1)) { if (ImGui::BeginDock("Scene", &sSceneDock)) {
ImVec2 size = ImGui::GetContentRegionAvail(); ImVec2 size = ImGui::GetContentRegionAvail();
ImVec2 pos = ImGui::GetWindowPos(); ImVec2 pos = ImGui::GetWindowPos();