![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
#include <ComponentPalettePanel.h>
Public Member Functions | |
| ComponentPalettePanel () | |
| ~ComponentPalettePanel () | |
| void | Initialize () |
| void | Render (EntityPrefabGraphDocument *document) |
| const std::vector< ComponentType > & | GetComponentTypes () const |
| void | RegisterComponentType (const std::string &name, const std::string &category, const std::string &description="") |
| bool | LoadComponentsFromJSON (const std::string &filepath) |
Private Member Functions | |
| void | RenderSearchBar () |
| void | RenderComponentList (EntityPrefabGraphDocument *document) |
| void | RenderCategoryTabs () |
| void | AddComponentToGraph (EntityPrefabGraphDocument *document, const ComponentType &componentType) |
| std::string | ExtractCategoryFromComponentType (const std::string &componentType) |
Private Attributes | |
| std::vector< ComponentType > | m_componentTypes |
| std::vector< std::string > | m_categories |
| std::vector< bool > | m_categoryExpanded |
| std::string | m_searchFilter |
| int | m_selectedCategoryIndex = 0 |
| char | m_searchBuffer [256] |
| char | m_draggedComponentBuffer [256] |
Static Private Attributes | |
| static constexpr float | CATEGORY_HEADER_HEIGHT = 22.0f |
| static constexpr float | COMPONENT_ITEM_HEIGHT = 18.0f |
| static constexpr float | COMPONENT_ITEM_PADDING_X = 5.0f |
| static constexpr float | COMPONENT_ITEM_PADDING_Y = 2.0f |
Definition at line 22 of file ComponentPalettePanel.h.
| Olympe::ComponentPalettePanel::ComponentPalettePanel | ( | ) |
Definition at line 13 of file ComponentPalettePanel.cpp.
References GetComponentTypeID_Static(), m_draggedComponentBuffer, and m_searchBuffer.
Here is the call graph for this function:| Olympe::ComponentPalettePanel::~ComponentPalettePanel | ( | ) |
Definition at line 19 of file ComponentPalettePanel.cpp.
|
private |
Definition at line 270 of file ComponentPalettePanel.cpp.
References GetComponentTypeID_Static(), Olympe::ComponentType::name, Olympe::ComponentNode::position, SYSTEM_LOG, and Olympe::Vector.
Here is the call graph for this function:
|
private |
Definition at line 416 of file ComponentPalettePanel.cpp.
Referenced by LoadComponentsFromJSON().
Here is the caller graph for this function:| const std::vector< ComponentType > & Olympe::ComponentPalettePanel::GetComponentTypes | ( | ) | const |
Definition at line 291 of file ComponentPalettePanel.cpp.
References m_componentTypes.
| void Olympe::ComponentPalettePanel::Initialize | ( | ) |
Definition at line 21 of file ComponentPalettePanel.cpp.
References GetComponentTypeID_Static(), LoadComponentsFromJSON(), m_categories, m_categoryExpanded, m_componentTypes, RegisterComponentType(), and SYSTEM_LOG.
Referenced by Olympe::EntityPrefabRenderer::EntityPrefabRenderer().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 301 of file ComponentPalettePanel.cpp.
References ExtractCategoryFromComponentType(), GetComponentTypeID_Static(), m_categories, m_componentTypes, RegisterComponentType(), and SYSTEM_LOG.
Referenced by Initialize().
Here is the call graph for this function:
Here is the caller graph for this function:| void Olympe::ComponentPalettePanel::RegisterComponentType | ( | const std::string & | name, |
| const std::string & | category, | ||
| const std::string & | description = "" |
||
| ) |
Definition at line 296 of file ComponentPalettePanel.cpp.
References m_componentTypes.
Referenced by Initialize(), and LoadComponentsFromJSON().
Here is the caller graph for this function:| void Olympe::ComponentPalettePanel::Render | ( | EntityPrefabGraphDocument * | document | ) |
Definition at line 97 of file ComponentPalettePanel.cpp.
References GetComponentTypeID_Static(), m_searchBuffer, m_searchFilter, and RenderCategoryTabs().
Referenced by Olympe::EntityPrefabRenderer::RenderRightPanelTabs().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 136 of file ComponentPalettePanel.cpp.
References CATEGORY_HEADER_HEIGHT, COMPONENT_ITEM_HEIGHT, COMPONENT_ITEM_PADDING_X, COMPONENT_ITEM_PADDING_Y, GetComponentTypeID_Static(), m_categories, m_categoryExpanded, m_componentTypes, m_draggedComponentBuffer, m_searchFilter, m_selectedCategoryIndex, and Olympe::ComponentType::name.
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 264 of file ComponentPalettePanel.cpp.
|
private |
Definition at line 130 of file ComponentPalettePanel.cpp.
References m_searchBuffer.
|
staticconstexprprivate |
Definition at line 45 of file ComponentPalettePanel.h.
Referenced by RenderCategoryTabs().
Definition at line 46 of file ComponentPalettePanel.h.
Referenced by RenderCategoryTabs().
|
staticconstexprprivate |
Definition at line 47 of file ComponentPalettePanel.h.
Referenced by RenderCategoryTabs().
|
staticconstexprprivate |
Definition at line 48 of file ComponentPalettePanel.h.
Referenced by RenderCategoryTabs().
|
private |
Definition at line 51 of file ComponentPalettePanel.h.
Referenced by Initialize(), LoadComponentsFromJSON(), and RenderCategoryTabs().
|
private |
Definition at line 52 of file ComponentPalettePanel.h.
Referenced by Initialize(), and RenderCategoryTabs().
|
private |
Definition at line 50 of file ComponentPalettePanel.h.
Referenced by GetComponentTypes(), Initialize(), LoadComponentsFromJSON(), RegisterComponentType(), and RenderCategoryTabs().
|
private |
Definition at line 56 of file ComponentPalettePanel.h.
Referenced by ComponentPalettePanel(), and RenderCategoryTabs().
|
private |
Definition at line 55 of file ComponentPalettePanel.h.
Referenced by ComponentPalettePanel(), Render(), and RenderSearchBar().
|
private |
Definition at line 53 of file ComponentPalettePanel.h.
Referenced by Render(), and RenderCategoryTabs().
|
private |
Definition at line 54 of file ComponentPalettePanel.h.
Referenced by RenderCategoryTabs().