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.
lunarium_OLD/src/run_modes/editor/panels/worldTree.cpp

48 lines
1.0 KiB
C++

/******************************************************************************
* 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;
}
ImGui::End();
return true;
}
}
}