nw::DialogPtr
-
struct DialogPtr
Public Functions
-
DialogPtr *add_ptr(DialogPtr *ptr, bool is_link = false)
Adds Dialog Pointer, if
is_linkis false no new pointer or node is created. ifis_linkis true a new pointer will created with the node copied from input pointer.
-
DialogPtr *add_string(String value, nw::LanguageID lang = nw::LanguageID::english, bool feminine = false)
Adds Dialog Pointer and Node with string value set.
-
void get_all_subnodes(Vector<DialogNode*> &subnodes)
Gets all sub-nodes that are not links When a pointer is removed from the dialog tree all of its sub-nodes must be removed from the main node list, unless they are links.
-
std::optional<String> get_condition_param(const String &key)
Gets a condition parameter if it exists.
-
void remove_condition_param(const String &key)
Removes condition parameter by key.
-
void remove_condition_param(size_t index)
Removes condition parameter by index.
-
void set_condition_param(const String &key, const String &value)
Sets condition parameter, if key does not exist key and value are appended.
Public Members
-
DialogNodeType type = DialogNodeType::entry
-
uint32_t index = std::numeric_limits<uint32_t>::max()
-
DialogNode *node = nullptr
-
Vector<std::pair<String, String>> condition_params
-
bool is_start = false
-
bool is_link = false
-
String comment
-
DialogPtr *add_ptr(DialogPtr *ptr, bool is_link = false)