Editor moved into it's own namespace within lunarium
parent
bd63502601
commit
35dc183111
@ -0,0 +1,43 @@
|
||||
/******************************************************************************
|
||||
* File - customProperties.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/01/27 (y/m/d)
|
||||
* Mod Date - 2022/01/27 (y/m/d)
|
||||
* Description - Handles a custom property
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef CUSTOM_PROPERTIES_H_
|
||||
#define CUSTOM_PROPERTIES_H_
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
namespace editor
|
||||
{
|
||||
|
||||
class CustomProperty
|
||||
{
|
||||
public:
|
||||
// Custom property types
|
||||
enum CType
|
||||
{
|
||||
CPT_INT,
|
||||
CPT_FLOAT,
|
||||
CPT_COLOR
|
||||
};
|
||||
|
||||
public:
|
||||
CustomProperty(CType type);
|
||||
|
||||
CType GetType() const;
|
||||
|
||||
virtual void Draw() = 0;
|
||||
|
||||
|
||||
private:
|
||||
CType mType;
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CUSTOM_PROPERTIES_H_
|
||||
@ -0,0 +1,29 @@
|
||||
/******************************************************************************
|
||||
* File - properties.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/01/26 (y/m/d)
|
||||
* Mod Date - 2022/01/26 (y/m/d)
|
||||
* Description - Displayes the properties and components(?) of the selected
|
||||
* object.
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef PROPERTIES_H_
|
||||
#define PROPERTIES_H_
|
||||
|
||||
#include "iPanel.h"
|
||||
#include <vector>
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
namespace editor
|
||||
{
|
||||
class Properties : public Panel
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // PROPERTIES_H_
|
||||
@ -1,22 +0,0 @@
|
||||
/******************************************************************************
|
||||
* File - sceneTree.h
|
||||
* 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 scene
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef SCENE_TREE_H_
|
||||
#define SCENE_TREE_H_
|
||||
|
||||
#include "iPanel.h"
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
class SceneTree : public Panel
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
#endif // SCENE_TREE_H_
|
||||
@ -0,0 +1,48 @@
|
||||
/******************************************************************************
|
||||
* 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
/******************************************************************************
|
||||
* File - worldTree.h
|
||||
* 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
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef WORLD_TREE_H_
|
||||
#define WORLD_TREE_H_
|
||||
|
||||
#include "iPanel.h"
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
namespace editor
|
||||
{
|
||||
class World;
|
||||
class WorldTree : public Panel
|
||||
{
|
||||
public:
|
||||
WorldTree();
|
||||
|
||||
void SetWorld(World* pWorld);
|
||||
World* GetWorld();
|
||||
|
||||
bool DoFrame();
|
||||
|
||||
private:
|
||||
World* mpWorld;
|
||||
};
|
||||
}
|
||||
}
|
||||
#endif // WORLD_TREE_H_
|
||||
@ -1,14 +1,17 @@
|
||||
/******************************************************************************
|
||||
* File - sceneTree.cpp
|
||||
* File - worldView.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 scene
|
||||
* Date - 2022/01/26 (y/m/d)
|
||||
* Mod Date - 2022/01/26 (y/m/d)
|
||||
* Description - A rendered view of the world
|
||||
******************************************************************************/
|
||||
|
||||
#include "sceneTree.h"
|
||||
#include "worldView.h"
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
namespace editor
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
/******************************************************************************
|
||||
* File - worldView.h
|
||||
* Author - Joey Pollack
|
||||
* Date - 2022/01/26 (y/m/d)
|
||||
* Mod Date - 2022/01/26 (y/m/d)
|
||||
* Description - A rendered view of the world
|
||||
******************************************************************************/
|
||||
|
||||
#ifndef WORLD_VIEW_H_
|
||||
#define WORLD_VIEW_H_
|
||||
|
||||
#include "iPanel.h"
|
||||
|
||||
namespace lunarium
|
||||
{
|
||||
namespace editor
|
||||
{
|
||||
class WorldView : public Panel
|
||||
{
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // WORLD_VIEW_H_
|
||||
Loading…
Reference in New Issue