Plutonium framework API 0.3.0
UI framework libraries for libnx
Loading...
Searching...
No Matches
pu::ui::extras::Toast Class Referencefinal

#include <extras_Toast.hpp>

Inheritance diagram for pu::ui::extras::Toast:
pu::ui::Overlay pu::ui::Container

Public Member Functions

 Toast (elm::TextBlock::Ref &text_block, const Color bg_clr)
 
void SetText (const std::string &text)
 
void OnPreRender (render::Renderer::Ref &drawer) override
 
void OnPostRender (render::Renderer::Ref &drawer) override
 
- Public Member Functions inherited from pu::ui::Overlay
 Overlay (const i32 x, const i32 y, const i32 width, const i32 height, const Color bg_clr)
 
bool HasRadius ()
 
bool Render (render::Renderer::Ref &drawer)
 
void NotifyEnding (const bool ending)
 
- Public Member Functions inherited from pu::ui::Container
 Container (const i32 x, const i32 y, const i32 width, const i32 height)
 
void Add (elm::Element::Ref elem)
 
std::vector< elm::Element::Ref > & GetElements ()
 
bool Has (elm::Element::Ref &elem)
 
void Clear ()
 
void PreRender ()
 

Static Public Attributes

static constexpr i32 DefaultY = 550
 
static constexpr i32 DefaulHeightAndTextHeightFactor = 3
 
static constexpr i32 DefaulHorizontalMargin = 50
 
static constexpr u8 DefaulBaseAlpha = 200
 
- Static Public Attributes inherited from pu::ui::Overlay
static constexpr i32 DefaultRadius = 37
 
static constexpr u8 DefaultMaxFadeAlpha = 200
 
static constexpr u8 DefaultFadeAlphaVariation = 25
 

Additional Inherited Members

- Protected Attributes inherited from pu::ui::Container
i32 x
 
i32 y
 
i32 w
 
i32 h
 
std::vector< elm::Element::Ref > elems
 

Constructor & Destructor Documentation

◆ Toast()

pu::ui::extras::Toast::Toast ( elm::TextBlock::Ref & text_block,
const Color bg_clr )

Member Function Documentation

◆ OnPostRender()

void pu::ui::extras::Toast::OnPostRender ( render::Renderer::Ref & drawer)
overridevirtual

Reimplemented from pu::ui::Overlay.

◆ OnPreRender()

void pu::ui::extras::Toast::OnPreRender ( render::Renderer::Ref & drawer)
overridevirtual

Reimplemented from pu::ui::Overlay.

◆ SetText()

void pu::ui::extras::Toast::SetText ( const std::string & text)

Member Data Documentation

◆ DefaulBaseAlpha

u8 pu::ui::extras::Toast::DefaulBaseAlpha = 200
staticconstexpr

◆ DefaulHeightAndTextHeightFactor

i32 pu::ui::extras::Toast::DefaulHeightAndTextHeightFactor = 3
staticconstexpr

◆ DefaulHorizontalMargin

i32 pu::ui::extras::Toast::DefaulHorizontalMargin = 50
staticconstexpr

◆ DefaultY

i32 pu::ui::extras::Toast::DefaultY = 550
staticconstexpr

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