X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Finterface.hpp;h=1f4bb9034baf8028a2bb0dd4386ea6165d40d92b;hb=4485397da18a25dfd1a51e864814887b66ba0f2e;hp=a4b7a92cef1cf10c1d9c79d30ab0ff72e9cf818f;hpb=f924498d348c33d0c27f129c599a7466312253b2;p=blank.git diff --git a/src/interface.hpp b/src/interface.hpp index a4b7a92..1f4bb90 100644 --- a/src/interface.hpp +++ b/src/interface.hpp @@ -8,6 +8,7 @@ #include "shader.hpp" #include +#include namespace blank { @@ -18,7 +19,17 @@ class World; class Interface { public: - explicit Interface(World &); + struct Config { + float move_velocity = 0.005f; + float pitch_sensitivity = -0.0025f; + float yaw_sensitivity = -0.001f; + + bool keyboard_disabled = false; + bool mouse_disabled = false; + bool visual_disabled = false; + }; + + Interface(const Config &, World &); void Handle(const SDL_KeyboardEvent &); void Handle(const SDL_MouseMotionEvent &); @@ -33,6 +44,12 @@ public: void PlaceBlock(); void RemoveBlock(); + void PrintBlockInfo(); + void PrintChunkInfo(); + void PrintLightInfo(); + void PrintSelectionInfo(); + void Print(const Block &); + void SelectNext(); void SelectPrevious(); @@ -52,14 +69,12 @@ private: OutlineModel outline; glm::mat4 outline_transform; - float move_velocity; - float pitch_sensitivity; - float yaw_sensitivity; + Config config; Block remove; Block selection; - bool front, back, left, right, up, down; + glm::tvec3 fwd, rev; };