![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Helper component for editing individual conversation nodes. More...
#include <ConversationNode.hpp>
Public Types | |
using | NotifyCb = std::function< void()> |
Called when the node value is modified. More... | |
using | CreateNode = std::function< unsigned int(unsigned int)> |
Called when a new node should be created. More... | |
using | SelectCb = std::function< void(unsigned int)> |
Called when a node is jumped to. More... | |
using | FocusCb = std::function< void(bool)> |
Public Member Functions | |
ConversationNode (const FocusCb &focusCb, const NotifyCb &editCb, const NotifyCb &deleteCb, const NotifyCb ®enTree, const CreateNode &createNode, const SelectCb &selectCb, bl::gui::Box::Ptr &container, const std::vector< core::file::Conversation::Node > *nodes) | |
Construct a new Conversation Node editor. More... | |
void | update (unsigned int i, const core::file::Conversation::Node &node) |
Update the node editor content with the given node value. More... | |
const core::file::Conversation::Node & | getValue () const |
Get the current node value. More... | |
void | setParent (bl::gui::GUI *parent) |
Set the parent GUI object. More... | |
Helper component for editing individual conversation nodes.
Definition at line 18 of file ConversationNode.hpp.
using editor::component::ConversationNode::CreateNode = std::function<unsigned int(unsigned int)> |
Called when a new node should be created.
Definition at line 24 of file ConversationNode.hpp.
using editor::component::ConversationNode::FocusCb = std::function<void(bool)> |
Definition at line 30 of file ConversationNode.hpp.
using editor::component::ConversationNode::NotifyCb = std::function<void()> |
Called when the node value is modified.
Definition at line 21 of file ConversationNode.hpp.
using editor::component::ConversationNode::SelectCb = std::function<void(unsigned int)> |
Called when a node is jumped to.
Definition at line 27 of file ConversationNode.hpp.
editor::component::ConversationNode::ConversationNode | ( | const FocusCb & | focusCb, |
const NotifyCb & | editCb, | ||
const NotifyCb & | deleteCb, | ||
const NotifyCb & | regenTree, | ||
const CreateNode & | createNode, | ||
const SelectCb & | selectCb, | ||
bl::gui::Box::Ptr & | container, | ||
const std::vector< core::file::Conversation::Node > * | nodes | ||
) |
Construct a new Conversation Node editor.
focusCb | Called when the parent window should force focus or not |
editCb | Callback for when the node is modified |
deleteCb | Callback for when the node is deleted |
regenTree | Called when the conversation tree should be re-rendered |
createNode | Called when a new conversation node should be created |
selectCb | Called when a node is jumped to |
container | The gui element to pack into |
nodes | A pointer to all nodes |
Definition at line 30 of file ConversationNode.cpp.
const Conversation::Node & editor::component::ConversationNode::getValue | ( | ) | const |
Get the current node value.
Definition at line 309 of file ConversationNode.cpp.
void editor::component::ConversationNode::setParent | ( | bl::gui::GUI * | parent | ) |
Set the parent GUI object.
Definition at line 195 of file ConversationNode.cpp.
void editor::component::ConversationNode::update | ( | unsigned int | i, |
const core::file::Conversation::Node & | node | ||
) |
Update the node editor content with the given node value.
i | The index of the current node |
node | Value to populate the gui with |
Definition at line 197 of file ConversationNode.cpp.