![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
UI palette for BT node selection. More...
#include <BTNodePalette.h>
Public Member Functions | |
| BTNodePalette () | |
| ~BTNodePalette ()=default | |
| void | Render (bool *isOpen) |
| Render the palette window. | |
| std::string | GetDraggedNodeType () const |
| Get the node type being dragged (if any) | |
| bool | IsDragging () const |
| Check if a drag operation is in progress. | |
| void | ResetDrag () |
| Reset drag state (call after drop) | |
Private Member Functions | |
| void | RenderCategory (const std::string &categoryName, BTNodeCategory category) |
| Render a category section. | |
| void | RenderNodeButton (const std::string &typeName) |
| Render a single node button. | |
Private Attributes | |
| std::string | m_draggedNodeType |
| bool | m_isDragging |
| char | m_searchFilter [256] |
UI palette for BT node selection.
Renders an ImGui window with all registered BT node types. Users can search and drag nodes to create them in the editor.
Definition at line 28 of file BTNodePalette.h.
| Olympe::AI::BTNodePalette::BTNodePalette | ( | ) |
Definition at line 24 of file BTNodePalette.cpp.
References m_searchFilter.
|
default |
|
inline |
Get the node type being dragged (if any)
Definition at line 43 of file BTNodePalette.h.
References m_draggedNodeType.
|
inline |
Check if a drag operation is in progress.
Definition at line 49 of file BTNodePalette.h.
References m_isDragging.
Referenced by Test9_PaletteInstantiation().
Here is the caller graph for this function:Render the palette window.
| isOpen | Pointer to bool controlling window visibility |
Definition at line 30 of file BTNodePalette.cpp.
References Olympe::AI::Action, Olympe::AI::Composite, Olympe::AI::Condition, Olympe::AI::Decorator, m_searchFilter, and RenderCategory().
Here is the call graph for this function:
|
private |
Render a category section.
| categoryName | Display name of category |
| category | Category enum |
Definition at line 45 of file BTNodePalette.cpp.
References Olympe::AI::BTNodeTypeInfo::displayName, Olympe::AI::BTNodeRegistry::Get(), GetComponentTypeID_Static(), m_searchFilter, and RenderNodeButton().
Referenced by Render().
Here is the call graph for this function:
Here is the caller graph for this function:Render a single node button.
| typeName | Node type identifier |
Definition at line 84 of file BTNodePalette.cpp.
References Olympe::AI::BTNodeRegistry::Get(), Olympe::NodeStyleRegistry::Get(), GetComponentTypeID_Static(), Olympe::NodeStyleRegistry::GetStyle(), Olympe::NodeStyle::headerColor, m_draggedNodeType, m_isDragging, and Olympe::StringToNodeType().
Referenced by RenderCategory().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Reset drag state (call after drop)
Definition at line 54 of file BTNodePalette.h.
References m_draggedNodeType, and m_isDragging.
|
private |
Definition at line 70 of file BTNodePalette.h.
Referenced by GetDraggedNodeType(), RenderNodeButton(), and ResetDrag().
|
private |
Definition at line 71 of file BTNodePalette.h.
Referenced by IsDragging(), RenderNodeButton(), and ResetDrag().
|
private |
Definition at line 72 of file BTNodePalette.h.
Referenced by BTNodePalette(), Render(), and RenderCategory().