R-Type
R-Type project
ConvertEnum.hpp
1 //
2 // Created by leq on 12/11/22.
3 //
4 
5 #ifndef RTYPE_CONVERTENUM_HPP
6 #define RTYPE_CONVERTENUM_HPP
7 
8 #include "KapEngine.hpp"
9 #include "KapEngineDebug.hpp"
10 #include "KapEngineEvents.hpp"
11 #include "KapEngineUi.hpp"
12 #include "KapUI/KapUI.hpp"
13 
14 using namespace KapEngine;
15 
16 namespace RType {
17 
18  class ConvertEnum : public Component {
19  public:
20  ConvertEnum(std::shared_ptr<GameObject> go, std::string prefsKey,
21  std::string prefix = "Move Up : ", KapEngine::Events::Key::EKey basicKey = KapEngine::Events::Key::Z);
22  ~ConvertEnum();
23 
24  static std::string KeyToString(int e);
25 
26  void onAwake() override;
27  void onUpdate() override;
28  void setTextKey();
29 
30  protected:
31  private:
32  std::shared_ptr<KapEngine::GameObject> _buttonKeyBoard;
33  std::string _prefix;
34  std::string _prefKey;
36  };
37 
38 } // namespace RType
39 
40 #endif // RTYPE_CONVERTENUM_HPP
KapEngine::Events::Key::EKey
EKey
all keys
Definition: Key.hpp:29
KapEngine::Component
Definition: Component.hpp:38
RType::ConvertEnum
Definition: ConvertEnum.hpp:18
KapEngine
main namespace
Definition: Component.hpp:17