Aether
SDL2 based UI Framework for NX
ProgressBar.hpp
1 #ifndef AETHER_PROGRESSBAR_HPP
2 #define AETHER_PROGRESSBAR_HPP
3 
4 #include "Aether/base/BaseProgress.hpp"
5 #include "Aether/primary/Box.hpp"
6 #include "Aether/primary/Rectangle.hpp"
7 
8 namespace Aether {
13  class ProgressBar : public BaseProgress {
14  private:
16  Box * boxTex;
18  Rectangle * progressTex;
19 
24  void redrawBar();
25 
26  public:
34  ProgressBar(int x, int y, int w);
35 
43  void setValue(float f);
44 
51  void setW(int w);
52 
59  void setH(int h);
60 
66  Colour colour();
67 
73  void setColour(Colour c);
74  };
75 };
76 
77 #endif
A rectangle is a texture containing either a normal or rounded rectangle.
Definition: Rectangle.hpp:11
Element for rendering a 'box' (rectangle with no fill).
Definition: Box.hpp:11
Colour colour()
Get the colour of the progress bar.
void setColour(Colour c)
Set the colour of the progress bar.
ProgressBar(int x, int y, int w)
Construct a new Progress Bar object.
ProgressBar looks similar to Horizon's progress bar shown in data management.
Definition: ProgressBar.hpp:13
int w()
Returns width of element.
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.
void setW(int w)
Set new width for the progress bar Textures will be redrawn when dimensions are changed.
int h()
Returns height of element.
Base namespace for all Aether related classes and functions.
void setH(int h)
Set new height for the progress bar Textures will be redrawn when dimensions are changed.
Base element for progress bars that handles the value.
Definition: BaseProgress.hpp:10
int y()
Returns y-coordinate of element.
void setValue(float f)
Set the value of the progress bar. When value is changed, the mask of the rectangle will also be chan...