Showing the changes to libraries/script-engine/src/EventTypes.cpp (1 of 4 files). Show all
Unified · Split
| @@ -23,13 +23,15 @@ · 22 unmodified lines | ||
| 23 | 23 | #include "TouchEvent.h" |
| 24 | 24 | #include "WheelEvent.h" |
| 25 | 25 | |
| 26 | −STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){ | |
| 27 | − auto scriptEngine = manager->engine().get(); | |
| 28 | − | |
| 26 | +//STATIC_SCRIPT_TYPES_INITIALIZER((+[](ScriptManager* manager){ | |
| 27 | +// auto scriptEngine = manager->engine().get(); | |
| 28 | + | |
| 29 | +void registerEventTypes(ScriptEngine* scriptEngine){ | |
| 29 | 30 | scriptRegisterMetaType<KeyEvent, KeyEvent::toScriptValue, KeyEvent::fromScriptValue>(scriptEngine, "KeyEvent"); |
| 30 | 31 | scriptRegisterMetaType<MouseEvent, MouseEvent::toScriptValue, MouseEvent::fromScriptValue>(scriptEngine, "MouseEvent"); |
| 31 | 32 | scriptRegisterMetaType<PointerEvent, PointerEvent::toScriptValue, PointerEvent::fromScriptValue>(scriptEngine, "PointerEvent"); |
| 32 | 33 | scriptRegisterMetaType<TouchEvent, TouchEvent::toScriptValue, TouchEvent::fromScriptValue>(scriptEngine, "TouchEvent"); |
| 33 | 34 | scriptRegisterMetaType<WheelEvent, WheelEvent::toScriptValue, WheelEvent::fromScriptValue>(scriptEngine, "WheelEvent"); |
| 34 | 35 | scriptRegisterMetaType<SpatialEvent, SpatialEvent::toScriptValue, SpatialEvent::fromScriptValue>(scriptEngine, "SpatialEvent"); |
| 35 | −})); | |
| 36 | +} | |
| 37 | +//})); | |