Aether
SDL2 based UI Framework for NX
RoundProgressBar.hpp
1 #ifndef AETHER_ROUNDPROGRESSBAR_HPP
2 #define AETHER_ROUNDPROGRESSBAR_HPP
3 
4 #include "Aether/base/BaseProgress.hpp"
5 #include "Aether/primary/Rectangle.hpp"
6 
7 namespace Aether {
12  class RoundProgressBar : public BaseProgress {
13  private:
15  Colour bgColour;
17  Rectangle * backTex;
19  Colour fgColour;
21  Rectangle * progressTex;
22 
26  void redrawBar();
27 
28  public:
37  RoundProgressBar(int x, int y, int w, int h = 12);
38 
46  void setValue(float f);
47 
54  void setW(int w);
55 
62  void setH(int h);
63 
70 
77 
84 
91  };
92 };
93 
94 #endif
A rectangle is a texture containing either a normal or rounded rectangle.
Definition: Rectangle.hpp:11
void setForegroundColour(Colour c)
Set the foreground colour of the progress bar.
A RoundProgressBar is a completely filled progress bar rounded at either end.
Definition: RoundProgressBar.hpp:12
Colour getBackgroundColour()
Get the background colour of the progress bar.
int w()
Returns width of element.
void setW(int w)
Set new width for the progress bar Textures will be redrawn when dimensions are changed.
Stores RGBA values representing a colour. Each component can be within the range 0 to 255 (inclusive)...
Definition: Colour.hpp:9
int x()
Returns x-coordinate of element.
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
void setValue(float f)
Set the value of the progress bar. When value is changed, the mask of the rectangle will also be chan...
void setH(int h)
Set new height for the progress bar Textures will be redrawn when dimensions are changed.
void setBackgroundColour(Colour c)
Set the background colour of the progress bar.
Colour getForegroundColour()
Get the foreground colour of the progress bar.
Base element for progress bars that handles the value.
Definition: BaseProgress.hpp:10
RoundProgressBar(int x, int y, int w, int h=12)
Construct a new Round Progress Bar object.
int y()
Returns y-coordinate of element.