Aether
SDL2 based UI Framework for NX
BaseText.hpp
1 #ifndef AETHER_BASETEXT_HPP
2 #define AETHER_BASETEXT_HPP
3 
4 #include "Aether/base/Texture.hpp"
5 #include <string>
6 
7 namespace Aether {
12  class BaseText : public Texture {
13  protected:
14  unsigned int fontSize_;
15  std::string string_;
17  public:
26  BaseText(const int x, const int y, const std::string & str, const unsigned int size);
27 
33  std::string string();
34 
40  virtual void setString(const std::string & str);
41 
47  unsigned int fontSize();
48 
54  virtual void setFontSize(const unsigned int size);
55  };
56 };
57 
58 #endif
virtual void setString(const std::string &str)
Set a new string. Will cause an immediate redraw.
std::string string()
Get the rendered string.
virtual void setFontSize(const unsigned int size)
Set the render font size for text.
int x()
Returns x-coordinate of element.
BaseText is an abstract class storing relevant information to render a text element.
Definition: BaseText.hpp:12
std::string string_
Font size used for rendered text.
Definition: BaseText.hpp:15
A Texture is an element that stores a texture to render in the window. It can&#39;t be instantiated alone...
Definition: Texture.hpp:24
Base namespace for all Aether related classes and functions.
BaseText(const int x, const int y, const std::string &str, const unsigned int size)
String matching rendered string.
unsigned int fontSize()
Get the font size of the rendered text.
int y()
Returns y-coordinate of element.