blob: 7c03e0e9f611caa2a1a442fcdd4fa0267c27be63 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef CLIENT_WINDOW_HUD_WINDOW_HH_
#define CLIENT_WINDOW_HUD_WINDOW_HH_
#include "client/render/struct.hh"
#include "client/window/basic_window.hh"
#include "client/window/window.hh"
#include "shared/entity/player.hh"
namespace client {
namespace window {
class hud_window : public basic_window {
private:
bool maybe_handle_keydown(const SDL_Event& event) noexcept;
public:
template <typename... Args>
hud_window(const float size) noexcept
: basic_window(
client::render::relative_arg{.extent = {0.5f, 0.0f},
.offset = {-size / 2.0f, 0.0f}},
client::render::relative_arg{.offset = {size, size / 10.0f}}) {}
virtual void draw() noexcept override;
virtual bool maybe_handle_event(const SDL_Event& event) noexcept override;
};
} // namespace window
} // namespace client
#endif
|