Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::AI::BTNodePalette Class Reference

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]
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ BTNodePalette()

Olympe::AI::BTNodePalette::BTNodePalette ( )

Definition at line 24 of file BTNodePalette.cpp.

References m_searchFilter.

◆ ~BTNodePalette()

Olympe::AI::BTNodePalette::~BTNodePalette ( )
default

Member Function Documentation

◆ GetDraggedNodeType()

std::string Olympe::AI::BTNodePalette::GetDraggedNodeType ( ) const
inline

Get the node type being dragged (if any)

Returns
Type name or empty string

Definition at line 43 of file BTNodePalette.h.

References m_draggedNodeType.

◆ IsDragging()

bool Olympe::AI::BTNodePalette::IsDragging ( ) const
inline

Check if a drag operation is in progress.

Returns
true if dragging

Definition at line 49 of file BTNodePalette.h.

References m_isDragging.

Referenced by Test9_PaletteInstantiation().

+ Here is the caller graph for this function:

◆ Render()

void Olympe::AI::BTNodePalette::Render ( bool isOpen)

Render the palette window.

Parameters
isOpenPointer 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:

◆ RenderCategory()

void Olympe::AI::BTNodePalette::RenderCategory ( const std::string &  categoryName,
BTNodeCategory  category 
)
private

Render a category section.

Parameters
categoryNameDisplay name of category
categoryCategory 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:

◆ RenderNodeButton()

void Olympe::AI::BTNodePalette::RenderNodeButton ( const std::string &  typeName)
private

Render a single node button.

Parameters
typeNameNode 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:

◆ ResetDrag()

void Olympe::AI::BTNodePalette::ResetDrag ( )
inline

Reset drag state (call after drop)

Definition at line 54 of file BTNodePalette.h.

References m_draggedNodeType, and m_isDragging.

Member Data Documentation

◆ m_draggedNodeType

std::string Olympe::AI::BTNodePalette::m_draggedNodeType
private

Definition at line 70 of file BTNodePalette.h.

Referenced by GetDraggedNodeType(), RenderNodeButton(), and ResetDrag().

◆ m_isDragging

bool Olympe::AI::BTNodePalette::m_isDragging
private

Definition at line 71 of file BTNodePalette.h.

Referenced by IsDragging(), RenderNodeButton(), and ResetDrag().

◆ m_searchFilter

char Olympe::AI::BTNodePalette::m_searchFilter[256]
private

Definition at line 72 of file BTNodePalette.h.

Referenced by BTNodePalette(), Render(), and RenderCategory().


The documentation for this class was generated from the following files: