Plutonium framework API  0.1
Simple UI framework for libnx and SDL2
pu::element::Menu Class Reference

#include <Menu.hpp>

Inheritance diagram for pu::element::Menu:
pu::element::Element

Public Member Functions

 Menu (u32 X, u32 Y, u32 Width, draw::Color OptionColor, u32 ItemSize, u32 ItemsToShow)
 
 ~Menu ()
 
u32 GetX ()
 
void SetX (u32 X)
 
u32 GetY ()
 
void SetY (u32 Y)
 
u32 GetWidth ()
 
void SetWidth (u32 Width)
 
u32 GetHeight ()
 
u32 GetItemSize ()
 
void SetItemSize (u32 ItemSize)
 
u32 GetNumberOfItemsToShow ()
 
void SetNumberOfItemsToShow (u32 ItemsToShow)
 
draw::Color GetColor ()
 
void SetColor (draw::Color Color)
 
draw::Color GetOnFocusColor ()
 
void SetOnFocusColor (draw::Color Color)
 
draw::Color GetScrollbarColor ()
 
void SetScrollbarColor (draw::Color Color)
 
void SetOnSelectionChanged (std::function< void()> Callback)
 
void AddItem (MenuItem *Item)
 
void ClearItems ()
 
void SetCooldownEnabled (bool Cooldown)
 
MenuItemGetSelectedItem ()
 
u32 GetSelectedIndex ()
 
void SetSelectedIndex (u32 Index)
 
void OnRender (render::Renderer *Drawer)
 
void OnInput (u64 Down, u64 Up, u64 Held, bool Touch, bool Focus)
 
- Public Member Functions inherited from pu::element::Element
 Element ()
 
virtual ~Element ()
 
void ProcessInput (void *Lyt, u64 Down, u64 Up, u64 Held, bool Touch)
 
bool IsVisible ()
 
void SetVisible (bool Visible)
 
bool IsAffectedByFocus ()
 
void SetAffectedByFocus (bool Affected)
 
ElementGetFocusChangeElement (FocusChangeDirection Direction)
 
void SetFocusChangeElement (FocusChangeDirection Direction, Element *ToChange)
 

Additional Inherited Members

- Protected Attributes inherited from pu::element::Element
bool visible
 
bool afocus
 
Elementfup
 
Elementfdown
 
Elementfleft
 
Elementfright
 

Constructor & Destructor Documentation

◆ Menu()

pu::element::Menu::Menu ( u32  X,
u32  Y,
u32  Width,
draw::Color  OptionColor,
u32  ItemSize,
u32  ItemsToShow 
)

◆ ~Menu()

pu::element::Menu::~Menu ( )

Member Function Documentation

◆ AddItem()

void pu::element::Menu::AddItem ( MenuItem Item)

◆ ClearItems()

void pu::element::Menu::ClearItems ( )

◆ GetColor()

draw::Color pu::element::Menu::GetColor ( )

◆ GetHeight()

u32 pu::element::Menu::GetHeight ( )
virtual

Implements pu::element::Element.

◆ GetItemSize()

u32 pu::element::Menu::GetItemSize ( )

◆ GetNumberOfItemsToShow()

u32 pu::element::Menu::GetNumberOfItemsToShow ( )

◆ GetOnFocusColor()

draw::Color pu::element::Menu::GetOnFocusColor ( )

◆ GetScrollbarColor()

draw::Color pu::element::Menu::GetScrollbarColor ( )

◆ GetSelectedIndex()

u32 pu::element::Menu::GetSelectedIndex ( )

◆ GetSelectedItem()

MenuItem* pu::element::Menu::GetSelectedItem ( )

◆ GetWidth()

u32 pu::element::Menu::GetWidth ( )
virtual

Implements pu::element::Element.

◆ GetX()

u32 pu::element::Menu::GetX ( )
virtual

Implements pu::element::Element.

◆ GetY()

u32 pu::element::Menu::GetY ( )
virtual

Implements pu::element::Element.

◆ OnInput()

void pu::element::Menu::OnInput ( u64  Down,
u64  Up,
u64  Held,
bool  Touch,
bool  Focus 
)
virtual

Implements pu::element::Element.

◆ OnRender()

void pu::element::Menu::OnRender ( render::Renderer Drawer)
virtual

Implements pu::element::Element.

◆ SetColor()

void pu::element::Menu::SetColor ( draw::Color  Color)

◆ SetCooldownEnabled()

void pu::element::Menu::SetCooldownEnabled ( bool  Cooldown)

◆ SetItemSize()

void pu::element::Menu::SetItemSize ( u32  ItemSize)

◆ SetNumberOfItemsToShow()

void pu::element::Menu::SetNumberOfItemsToShow ( u32  ItemsToShow)

◆ SetOnFocusColor()

void pu::element::Menu::SetOnFocusColor ( draw::Color  Color)

◆ SetOnSelectionChanged()

void pu::element::Menu::SetOnSelectionChanged ( std::function< void()>  Callback)

◆ SetScrollbarColor()

void pu::element::Menu::SetScrollbarColor ( draw::Color  Color)

◆ SetSelectedIndex()

void pu::element::Menu::SetSelectedIndex ( u32  Index)

◆ SetWidth()

void pu::element::Menu::SetWidth ( u32  Width)

◆ SetX()

void pu::element::Menu::SetX ( u32  X)

◆ SetY()

void pu::element::Menu::SetY ( u32  Y)

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