UGDK
0.5.0
|
#include <ugdk/ui/menu.h>
Public Member Functions | |
Menu (const structure::Box< 2 > &tree_bounding_box, const math::Vector2D &offset, HookPoint hook=HookPoint::TOP_LEFT) | |
~Menu () | |
std::shared_ptr< std::vector < UIElement * > > | GetMouseCollision () |
void | AddCallback (const ugdk::input::Keycode &key, const MenuCallback &callback) |
void | SetOptionDrawable (std::unique_ptr< Drawable > &&option_graphic, int index=0) |
void | AddObject (UIElement *obj) |
void | RemoveObject (UIElement *obj) |
void | RefreshObject (UIElement *obj) |
void | InteractWithFocused () |
Node * | node () |
const UIElement * | focused_element () const |
const InputCallbacks & | input_callbacks () const |
Public Member Functions inherited from ugdk::action::Scene | |
Scene () | |
virtual | ~Scene () |
virtual void | Focus () |
Method called when this Scene arrives on the top of the Scene stack. More... | |
virtual void | DeFocus () |
Method called when this Scene leaves the top of the Scene stack. More... | |
virtual void | OnPushed (int index) |
Method called when this scene is pushed to the Engine's Scene stack. More... | |
void | Finish () |
Finishes the scene. More... | |
void | StopsPreviousMusic (bool set) |
Whether this scene stops the previous music even if wont play any music. More... | |
void | Update (double delta_t) |
Logical update of the scene. More... | |
void | Render (graphic::Canvas &) const |
Renders the scene to the given canvas if the scene is visible. More... | |
void | set_render_function (const std::function< void(graphic::Canvas &canvas)> &render_function) |
const std::string & | identifier () const |
void | set_identifier (const std::string &new_identifier) |
bool | finished () const |
bool | active () const |
void | set_active (bool is_active) |
bool | visible () const |
void | set_visible (bool is_visible) |
MediaManager & | media_manager () |
const MediaManager & | media_manager () const |
system::EventHandler & | event_handler () |
const system::EventHandler & | event_handler () const |
audio::Music * | background_music () const |
void | set_background_music (audio::Music *music) |
Public Member Functions inherited from ugdk::system::TaskPlayer | |
TaskPlayer () | |
virtual | ~TaskPlayer () |
void | AddTask (const Task &task) |
Adds a task to the scene. More... | |
void | Update (double delta_t) |
Executes all tasks held. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from ugdk::action::Scene | |
virtual void | End () |
Ends the scene activity. More... | |
ugdk::ui::Menu::Menu | ( | const structure::Box< 2 > & | tree_bounding_box, |
const math::Vector2D & | offset, | ||
HookPoint | hook = HookPoint::TOP_LEFT |
||
) |
ugdk::ui::Menu::~Menu | ( | ) |
void ugdk::ui::Menu::AddCallback | ( | const ugdk::input::Keycode & | key, |
const MenuCallback & | callback | ||
) |
void ugdk::ui::Menu::AddObject | ( | UIElement * | obj | ) |
|
inline |
std::shared_ptr< std::vector<UIElement *> > ugdk::ui::Menu::GetMouseCollision | ( | ) |
|
inline |
void ugdk::ui::Menu::InteractWithFocused | ( | ) |
|
inline |
void ugdk::ui::Menu::RefreshObject | ( | UIElement * | obj | ) |
void ugdk::ui::Menu::RemoveObject | ( | UIElement * | obj | ) |
void ugdk::ui::Menu::SetOptionDrawable | ( | std::unique_ptr< Drawable > && | option_graphic, |
int | index = 0 |
||
) |