Voxellancer  0.3
A game about voxels in space
 All Classes Functions Pages
textfieldhudget.h
1 #pragma once
2 
3 #include <memory>
4 #include <string>
5 
6 #include "hudget.h"
7 #include "ui/voxelfontconstants.h"
8 
10 
11 
12 class TextFieldHudget : public Hudget {
13 public:
14  TextFieldHudget(HUD* hud, const glm::vec3& direction, float scale = 0.5f, const std::string& content = "", FontSize fontSize = FontSize::SIZE5x7);
15  virtual ~TextFieldHudget();
16 
17  void setText(const std::string& content);
18 
19  virtual void update(float deltaSec) override;
20  virtual void draw() override;
21 
22  virtual bool isAt(const Ray& ray) const override;
23 
24  virtual void onClick(ClickType clickType) override;
25 
26 
27 protected:
28  std::string m_text;
29  std::unique_ptr<TextFieldHudgetVoxels> m_voxels;
30 };
31 
Definition: textfieldhudgetvoxels.h:12
Definition: hudget.h:15
Definition: hud.h:34
Definition: textfieldhudget.h:12
Definition: ray.h:12