Plutonium framework API  0.3
Simple UI framework for libnx and SDL2
extras_Toast.hpp
Go to the documentation of this file.
1 
2 /*
3 
4  Plutonium library
5 
6  @file extras_Toast.hpp
7  @brief An Overlay similar to Android's toast notifications
8  @author XorTroll
9 
10  @copyright Plutonium project - an easy-to-use UI framework for Nintendo Switch homebrew
11 
12 */
13 
14 #pragma once
15 #include <pu/ui/ui_Overlay.hpp>
17 
18 namespace pu::ui::extras
19 {
20  class Toast final : public Overlay
21  {
22  public:
23  Toast(String Text, String font_name, Color TextColor, Color BaseColor);
25 
26  void SetText(String Text);
27  void OnPreRender(render::Renderer::Ref &Drawer);
28  void OnPostRender(render::Renderer::Ref &Drawer);
29  private:
30  pu::ui::elm::TextBlock::Ref text;
31  };
32 }
Definition: pu_String.hpp:21
void OnPostRender(render::Renderer::Ref &Drawer)
Definition: ui_Types.hpp:24
Definition: extras_Toast.hpp:18
#define PU_SMART_CTOR(type)
Definition: pu_Macros.hpp:8
void SetText(String Text)
Definition: extras_Toast.hpp:20
Toast(String Text, String font_name, Color TextColor, Color BaseColor)
Definition: ui_Overlay.hpp:19
void OnPreRender(render::Renderer::Ref &Drawer)