1 #ifndef BLANK_UI_INTERFACE_HPP_
2 #define BLANK_UI_INTERFACE_HPP_
4 #include "FixedText.hpp"
6 #include "MessageBox.hpp"
7 #include "../app/FPSController.hpp"
8 #include "../app/IntervalTimer.hpp"
9 #include "../audio/Sound.hpp"
10 #include "../model/geometry.hpp"
11 #include "../model/OutlineModel.hpp"
12 #include "../world/Block.hpp"
15 #include <glm/glm.hpp>
30 float move_velocity = 0.005f;
31 float pitch_sensitivity = -0.0025f;
32 float yaw_sensitivity = -0.001f;
34 bool keyboard_disabled = false;
35 bool mouse_disabled = false;
36 bool audio_disabled = false;
37 bool visual_disabled = false;
40 Interface(const Config &, Environment &, World &);
42 void HandlePress(const SDL_KeyboardEvent &);
43 void HandleRelease(const SDL_KeyboardEvent &);
44 void Handle(const SDL_MouseMotionEvent &);
45 void HandlePress(const SDL_MouseButtonEvent &);
46 void HandleRelease(const SDL_MouseButtonEvent &);
47 void Handle(const SDL_MouseWheelEvent &);
52 void ToggleCollision();
56 void RemoveBlock() noexcept;
58 void PrintBlockInfo();
59 void PrintChunkInfo();
60 void PrintLightInfo();
61 void PrintSelectionInfo();
62 void Print(const Block &);
65 void SelectPrevious();
72 void UpdatePosition();
73 void UpdateOrientation();
75 void PostMessage(const char *);
76 void PostMessage(const std::string &msg) {
77 PostMessage(msg.c_str());
82 void Render(Viewport &) noexcept;
99 glm::mat4 outline_transform;
101 FixedText counter_text;
102 FixedText position_text;
103 FixedText orientation_text;
105 IntervalTimer msg_timer;
109 IntervalTimer place_timer;
110 IntervalTimer remove_timer;