You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
/******************************************************************************
|
|
|
|
|
* 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 <game/world/world.h>
|
|
|
|
|
#include <dearimgui/imgui.h>
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|