![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Singleton providing NodeStyle descriptors per NodeType. More...
#include <NodeStyleRegistry.h>
Collaboration diagram for Olympe::NodeStyleRegistry:Public Member Functions | |
| const NodeStyle & | GetStyle (NodeType type) const |
| Returns the style for the given node type. | |
| const NodeStyle & | GetStyleByTaskID (const std::string &taskId) const |
| Returns the style to use for an atomic-task node identified by ID. | |
| const NodeStyle & | GetStyleByVSTypeName (const std::string &vsTypeName) const |
| Returns the style for a VS node type identified by string. | |
Static Public Member Functions | |
| static NodeStyleRegistry & | Get () |
| Returns the singleton instance. | |
| static ImU32 | GetExecPinColor () |
| Colour for execution-flow (exec) pins — white. | |
| static ImU32 | GetDataPinColor () |
| Colour for data pins — green. | |
Private Member Functions | |
| NodeStyleRegistry () | |
Private Attributes | |
| NodeStyle | m_defaultStyle |
| std::unordered_map< int, NodeStyle > | m_styles |
| Key is the underlying int value of NodeType. | |
| std::unordered_map< std::string, NodeStyle > | m_vsStyles |
| Key is the VS type name string (TaskNodeType as string). | |
Singleton providing NodeStyle descriptors per NodeType.
Usage:
For exec-flow pins use GetExecPinColor(); for data pins GetDataPinColor().
Definition at line 63 of file NodeStyleRegistry.h.
|
private |
Definition at line 30 of file NodeStyleRegistry.cpp.
References ColorScheme::Action_Hovered, ColorScheme::Action_Primary, ColorScheme::Action_Selected, Olympe::BT_Action, Olympe::BT_Condition, Olympe::BT_Cooldown, Olympe::BT_Decorator, Olympe::BT_Inverter, Olympe::BT_Monitor, Olympe::BT_OnEvent, Olympe::BT_Parallel, Olympe::BT_ParallelThreshold, Olympe::BT_RandomSelector, Olympe::BT_Repeater, Olympe::BT_Root, Olympe::BT_Selector, Olympe::BT_SendMessage, Olympe::BT_Sequence, Olympe::BT_SubGraph, Olympe::BT_UntilFailure, Olympe::BT_UntilSuccess, Olympe::Comment, ColorScheme::Comment_Hovered, ColorScheme::Comment_Primary, ColorScheme::Comment_Selected, ColorScheme::Composite_Hovered, ColorScheme::Composite_Primary, ColorScheme::Composite_Selected, ColorScheme::EntryPoint_Hovered, ColorScheme::EntryPoint_Primary, ColorScheme::EntryPoint_Selected, ColorScheme::FlowControl_Hovered, ColorScheme::FlowControl_Primary, ColorScheme::FlowControl_Selected, GetComponentTypeID_Static(), Olympe::NodeStyle::headerColor, Olympe::HFSM_State, Olympe::HFSM_Transition, ColorScheme::Inverter_Hovered, ColorScheme::Inverter_Primary, ColorScheme::Inverter_Selected, m_styles, m_vsStyles, ColorScheme::Repeater_Hovered, ColorScheme::Repeater_Primary, ColorScheme::Repeater_Selected, ColorScheme::SubGraph_Hovered, ColorScheme::SubGraph_Primary, and ColorScheme::SubGraph_Selected.
Here is the call graph for this function:
|
static |
Returns the singleton instance.
Definition at line 20 of file NodeStyleRegistry.cpp.
Referenced by Olympe::NodeGraphPanel::RenderGraph(), Olympe::AI::BTNodePalette::RenderNodeButton(), Olympe::NodeGraphPanel::RenderNodePinsAndContent(), and Olympe::NodeGraphShared::RenderNodeVisual().
Here is the caller graph for this function:
|
static |
Colour for data pins — green.
Definition at line 416 of file NodeStyleRegistry.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:
|
static |
Colour for execution-flow (exec) pins — white.
Definition at line 411 of file NodeStyleRegistry.cpp.
References GetComponentTypeID_Static().
Here is the call graph for this function:Returns the style for the given node type.
Falls back to the default grey style for unknown types.
Definition at line 386 of file NodeStyleRegistry.cpp.
References GetComponentTypeID_Static(), m_defaultStyle, and m_styles.
Referenced by Olympe::NodeGraphPanel::RenderGraph(), Olympe::AI::BTNodePalette::RenderNodeButton(), Olympe::NodeGraphPanel::RenderNodePinsAndContent(), and Olympe::NodeGraphShared::RenderNodeVisual().
Here is the call graph for this function:
Here is the caller graph for this function:Returns the style to use for an atomic-task node identified by ID.
Currently returns the BT_Action style for all task IDs.
Definition at line 398 of file NodeStyleRegistry.cpp.
References Olympe::BT_Action, GetComponentTypeID_Static(), m_defaultStyle, and m_styles.
Here is the call graph for this function:| const NodeStyle & Olympe::NodeStyleRegistry::GetStyleByVSTypeName | ( | const std::string & | vsTypeName | ) | const |
Returns the style for a VS node type identified by string.
Used by the VS graph renderer which uses TaskNodeType, not the legacy NodeType enum.
| vsTypeName | String form of TaskNodeType (e.g. "EntryPoint", "Branch", "Delay"). |
Definition at line 374 of file NodeStyleRegistry.cpp.
References GetComponentTypeID_Static(), m_defaultStyle, and m_vsStyles.
Here is the call graph for this function:
|
private |
Definition at line 101 of file NodeStyleRegistry.h.
Referenced by GetStyle(), GetStyleByTaskID(), and GetStyleByVSTypeName().
Key is the underlying int value of NodeType.
Definition at line 104 of file NodeStyleRegistry.h.
Referenced by GetStyle(), GetStyleByTaskID(), and NodeStyleRegistry().
|
private |
Key is the VS type name string (TaskNodeType as string).
Definition at line 107 of file NodeStyleRegistry.h.
Referenced by GetStyleByVSTypeName(), and NodeStyleRegistry().