Overlay implementation that represents a simple message that appears on the screen.
More...
#include <extras_Toast.hpp>
|
| | Toast (elm::TextBlock::Ref &text_block, const Color bg_clr) |
| | Creates a new instance of a Toast.
|
| |
| void | SetText (const std::string &text) |
| | Sets the text of the Toast.
|
| |
| void | OnPreRender (render::Renderer::Ref &drawer) override |
| | Function called before the overlay is rendered. You may use it to configure additional effects, such as alpha modulation during the Overlay rendering.
|
| |
| void | OnPostRender (render::Renderer::Ref &drawer) override |
| | Function called after the overlay is rendered. You may use it to configure additional effects, such as alpha modulation during the Overlay rendering.
|
| |
| | Overlay (const i32 x, const i32 y, const i32 width, const i32 height, const Color bg_clr) |
| | Creates a new Overlay with the specified position, size, and background color.
|
| |
| bool | HasRadius () |
| | Checks whether the overlay has a radius for its background rectangle.
|
| |
| bool | Render (render::Renderer::Ref &drawer) |
| | Rendering callback of the overlay.
|
| |
| void | NotifyEnding (const bool ending) |
| | Notifies the overlay that it is ending (fading out).
|
| |
| | Container (const i32 x, const i32 y, const i32 width, const i32 height) |
| | Creates a new Container with the specified position and size.
|
| |
| void | Add (elm::Element::Ref elem) |
| | Adds an Element to the Container.
|
| |
| std::vector< elm::Element::Ref > & | GetElements () |
| | Gets the list of Elements in the Container.
|
| |
| bool | Has (elm::Element::Ref &elem) |
| | Gets whether the Container has the specified Element.
|
| |
| void | Clear () |
| | Removes all elements from the Container.
|
| |
| void | PreRender () |
| | Function to be invoked before rendering the Container.
|
| |
Overlay implementation that represents a simple message that appears on the screen.
◆ Toast()
| pu::ui::extras::Toast::Toast |
( |
elm::TextBlock::Ref & | text_block, |
|
|
const Color | bg_clr ) |
Creates a new instance of a Toast.
- Parameters
-
| text_block | TextBlock to use for the Toast. |
| bg_clr | Background color of the Toast. |
◆ OnPostRender()
| void pu::ui::extras::Toast::OnPostRender |
( |
render::Renderer::Ref & | drawer | ) |
|
|
overridevirtual |
Function called after the overlay is rendered. You may use it to configure additional effects, such as alpha modulation during the Overlay rendering.
- Parameters
-
| drawer | Renderer used to render the overlay. |
Reimplemented from pu::ui::Overlay.
◆ OnPreRender()
| void pu::ui::extras::Toast::OnPreRender |
( |
render::Renderer::Ref & | drawer | ) |
|
|
overridevirtual |
Function called before the overlay is rendered. You may use it to configure additional effects, such as alpha modulation during the Overlay rendering.
- Parameters
-
| drawer | Renderer used to render the overlay. |
Reimplemented from pu::ui::Overlay.
◆ SetText()
| void pu::ui::extras::Toast::SetText |
( |
const std::string & | text | ) |
|
Sets the text of the Toast.
- Parameters
-
◆ 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: