![]() |
Peoplemon
0.1.0
Peoplemon 3 game source documentation
|
Inline GUI elements with openable window for editing behaviors. More...
#include <BehaviorEditor.hpp>
Public Types | |
using | OnSetCb = std::function< void()> |
using | NotifyWindowCb = std::function< void()> |
Public Member Functions | |
BehaviorEditor (const OnSetCb &cb, const NotifyWindowCb &onOpen, const NotifyWindowCb &onClose) | |
Construct a new Behavior Editor. More... | |
const core::file::Behavior & | getValue () const |
Returns the behavior value. More... | |
void | pack (bl::gui::Box::Ptr parent) |
Packs the GUI elements for the editor into the given container. More... | |
void | configure (bl::gui::GUI *parent, const core::file::Behavior &behavior) |
Sets the parent GUI object and current value. Call before using. More... | |
void | hide () |
Hides the editor window if opened. More... | |
Inline GUI elements with openable window for editing behaviors.
Definition at line 17 of file BehaviorEditor.hpp.
using editor::component::BehaviorEditor::NotifyWindowCb = std::function<void()> |
Definition at line 20 of file BehaviorEditor.hpp.
using editor::component::BehaviorEditor::OnSetCb = std::function<void()> |
Definition at line 19 of file BehaviorEditor.hpp.
editor::component::BehaviorEditor::BehaviorEditor | ( | const OnSetCb & | cb, |
const NotifyWindowCb & | onOpen, | ||
const NotifyWindowCb & | onClose | ||
) |
Construct a new Behavior Editor.
cb | Callback for when the behavior is modified |
onOpen | Called when the window is opened |
onClose | Called when the window is closed |
Definition at line 46 of file BehaviorEditor.cpp.
void editor::component::BehaviorEditor::configure | ( | bl::gui::GUI * | parent, |
const core::file::Behavior & | behavior | ||
) |
Sets the parent GUI object and current value. Call before using.
parent | The parent GUI object |
behavior | The behavior value to init with |
Definition at line 160 of file BehaviorEditor.cpp.
const core::file::Behavior & editor::component::BehaviorEditor::getValue | ( | ) | const |
Returns the behavior value.
Definition at line 196 of file BehaviorEditor.cpp.
void editor::component::BehaviorEditor::hide | ( | ) |
Hides the editor window if opened.
Definition at line 190 of file BehaviorEditor.cpp.
void editor::component::BehaviorEditor::pack | ( | bl::gui::Box::Ptr | parent | ) |
Packs the GUI elements for the editor into the given container.
parent | The box to pack in |
Definition at line 148 of file BehaviorEditor.cpp.