UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::ui::Menu Class Reference

#include <ugdk/ui/menu.h>

Inheritance diagram for ugdk::ui::Menu:
Collaboration diagram for ugdk::ui::Menu:

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 ()
 
Nodenode ()
 
const UIElementfocused_element () const
 
const InputCallbacksinput_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)
 
MediaManagermedia_manager ()
 
const MediaManagermedia_manager () const
 
system::EventHandlerevent_handler ()
 
const system::EventHandlerevent_handler () const
 
audio::Musicbackground_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...
 

Constructor & Destructor Documentation

ugdk::ui::Menu::Menu ( const structure::Box< 2 > &  tree_bounding_box,
const math::Vector2D offset,
HookPoint  hook = HookPoint::TOP_LEFT 
)
ugdk::ui::Menu::~Menu ( )

Member Function Documentation

void ugdk::ui::Menu::AddCallback ( const ugdk::input::Keycode key,
const MenuCallback callback 
)
void ugdk::ui::Menu::AddObject ( UIElement obj)
const UIElement* ugdk::ui::Menu::focused_element ( ) const
inline
std::shared_ptr< std::vector<UIElement *> > ugdk::ui::Menu::GetMouseCollision ( )
const InputCallbacks& ugdk::ui::Menu::input_callbacks ( ) const
inline
void ugdk::ui::Menu::InteractWithFocused ( )
Node* ugdk::ui::Menu::node ( )
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 
)

The documentation for this class was generated from the following file: