]> git.localhorst.tv Git - blank.git/blob - src/ui/Progress.hpp
tentative optimization of chunk intersection test
[blank.git] / src / ui / Progress.hpp
1 #ifndef BLANK_UI_PROGRESS_HPP_
2 #define BLANK_UI_PROGRESS_HPP_
3
4 #include "FixedText.hpp"
5
6
7 namespace blank {
8
9 class Font;
10 class Viewport;
11
12 class Progress {
13
14 public:
15         explicit Progress(Font &) noexcept;
16
17         void Position(const glm::vec3 &p, Gravity g) noexcept { text.Position(p, g); }
18         void Template(const char *t) noexcept { tpl = t; }
19
20         void Update(int current, int total);
21         void Render(Viewport &) noexcept;
22
23 private:
24         Font &font;
25         FixedText text;
26         const char *tpl;
27
28 };
29
30 }
31
32 #endif