/****************************************************************************** * File - worldTree.cpp * Author - Joey Pollack * Date - 2021/11/04 (y/m/d) * Mod Date - 2021/11/04 (y/m/d) * Description - The tree view listing all objects in the world ******************************************************************************/ #include "worldTree.h" #include #include namespace lunarium { namespace editor { WorldTree::WorldTree() : Panel(PT_WORLD_TREE, true), mpWorld(nullptr) { } void WorldTree::SetWorld(World* pWorld) { mpWorld = pWorld; } World* WorldTree::GetWorld() { return mpWorld; } bool WorldTree::DoFrame() { if (!mIsOpen) return false; if (!ImGui::Begin("World Tree", &mIsOpen, ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoScrollbar)) { ImGui::End(); return false; } if (ImGui::TreeNode("World Root")) { // TODO: Build tree of world contents ImGui::TreePop(); } ImGui::End(); return true; } } }