28 auto& lua = entt::locator<sol::state>::value();
30 auto gf_type = lua.new_usertype<
GainedFocus>(sol::constructors<GainedFocus()>());
31 gf_type[
"type_id"] = &entt::type_hash<GainedFocus>::value;
35 auto ki_type = lua.new_usertype<
KeyInput>(
"KeyInput", sol::constructors<KeyInput(std::string&&)>());
36 ki_type[
"type_id"] = &entt::type_hash<KeyInput>::value;
41 auto kp_type = lua.new_usertype<
KeyPressed>(
"KeyPressed", sol::constructors<KeyPressed(const SDL_Scancode, const Keys, const KeyMods, const unsigned short, const bool)>());
42 kp_type[
"type_id"] = &entt::type_hash<KeyPressed>::value;
52 lua.new_usertype<
KeyReleased>(
"KeyReleased", sol::constructors<KeyReleased(const SDL_Scancode, const Keys, const KeyMods, const unsigned short, const bool)>());
53 kr_type[
"type_id"] = &entt::type_hash<KeyReleased>::value;
62 auto lf_type = lua.new_usertype<
LostFocus>(sol::constructors<LostFocus()>());
63 lf_type[
"type_id"] = &entt::type_hash<LostFocus>::value;
67 auto mm_type = lua.new_usertype<
MouseMoved>(
"MouseMoved", sol::constructors<MouseMoved(const float, const float, const float, const float)>());
68 mm_type[
"type_id"] = &entt::type_hash<MouseMoved>::value;
72 auto mp_type = lua.new_usertype<
MousePressed>(
"MousePressed", sol::constructors<MousePressed(const float, const float, const int, const MouseButton)>());
73 mp_type[
"type_id"] = &entt::type_hash<MousePressed>::value;
81 auto mr_type = lua.new_usertype<
MouseReleased>(
"MouseReleased", sol::constructors<MouseReleased(const float, const float, const int, const MouseButton)>());
82 mr_type[
"type_id"] = &entt::type_hash<MouseReleased>::value;
92 sol::constructors<MouseWheel(const float, const float, const SDL_MouseWheelDirection, const float, const float, const int, const int)>()
94 mw_type[
"type_id"] = &entt::type_hash<MouseWheel>::value;
104 auto wr_type = lua.new_usertype<
WindowResized>(
"WindowResized", sol::constructors<WindowResized(const int, const int)>());
105 wr_type[
"type_id"] = &entt::type_hash<WindowResized>::value;
111 entt_sol::register_meta_event<GainedFocus>();
112 entt_sol::register_meta_event<KeyPressed>();
113 entt_sol::register_meta_event<KeyReleased>();
114 entt_sol::register_meta_event<LostFocus>();
115 entt_sol::register_meta_event<MouseMoved>();
116 entt_sol::register_meta_event<MousePressed>();
117 entt_sol::register_meta_event<MouseReleased>();
118 entt_sol::register_meta_event<MouseWheel>();
119 entt_sol::register_meta_event<WindowResized>();