![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Command to edit a node parameter. More...
#include <BTEditorCommand.h>
Inheritance diagram for Olympe::EditParameterCommand:
Collaboration diagram for Olympe::EditParameterCommand:Public Types | |
| enum class | ParamType { String , Int , Float } |
Public Member Functions | |
| EditParameterCommand (BehaviorTreeAsset *tree, uint32_t nodeId, const std::string ¶mName, const std::string &oldValue, const std::string &newValue, ParamType type) | |
| void | Execute () override |
| Execute the command. | |
| void | Undo () override |
| Undo the command. | |
| std::string | GetDescription () const override |
| Get a human-readable description of the command. | |
Public Member Functions inherited from Olympe::BTEditorCommand | |
| virtual | ~BTEditorCommand ()=default |
Private Attributes | |
| BehaviorTreeAsset * | m_tree |
| uint32_t | m_nodeId |
| std::string | m_paramName |
| std::string | m_oldValue |
| std::string | m_newValue |
| ParamType | m_paramType |
Command to edit a node parameter.
Definition at line 210 of file BTEditorCommand.h.
| Enumerator | |
|---|---|
| String | |
| Int | |
| Float | |
Definition at line 213 of file BTEditorCommand.h.
| Olympe::EditParameterCommand::EditParameterCommand | ( | BehaviorTreeAsset * | tree, |
| uint32_t | nodeId, | ||
| const std::string & | paramName, | ||
| const std::string & | oldValue, | ||
| const std::string & | newValue, | ||
| ParamType | type | ||
| ) |
Definition at line 329 of file BTEditorCommand.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::BTEditorCommand.
Definition at line 341 of file BTEditorCommand.cpp.
References Float, GetComponentTypeID_Static(), BehaviorTreeAsset::GetNode(), Int, m_newValue, m_nodeId, m_paramName, m_paramType, m_tree, String, and BTNode::stringParams.
Here is the call graph for this function:
|
overridevirtual |
Get a human-readable description of the command.
Implements Olympe::BTEditorCommand.
Definition at line 393 of file BTEditorCommand.cpp.
References m_paramName.
|
overridevirtual |
Undo the command.
Implements Olympe::BTEditorCommand.
Definition at line 367 of file BTEditorCommand.cpp.
References Float, GetComponentTypeID_Static(), BehaviorTreeAsset::GetNode(), Int, m_nodeId, m_oldValue, m_paramName, m_paramType, m_tree, String, and BTNode::stringParams.
Here is the call graph for this function:
|
private |
Definition at line 228 of file BTEditorCommand.h.
Referenced by Execute().
|
private |
Definition at line 225 of file BTEditorCommand.h.
|
private |
Definition at line 227 of file BTEditorCommand.h.
Referenced by Undo().
|
private |
Definition at line 226 of file BTEditorCommand.h.
Referenced by Execute(), GetDescription(), and Undo().
|
private |
Definition at line 229 of file BTEditorCommand.h.
|
private |
Definition at line 224 of file BTEditorCommand.h.