Showing the changes to libraries/script-engine/src/ScriptEngine.cpp (1 of 9 files). Show all
Unified · Split
| @@ -90,6 +90,8 @@ bool ScriptEngine::setScriptContents(const QString& scriptContents) { · 89 unmodified lines | ||
| 90 | 90 | return true; |
| 91 | 91 | } |
| 92 | 92 | |
| 93 | +Q_SCRIPT_DECLARE_QMETAOBJECT(AudioInjectorOptions, QObject*) | |
| 94 | + | |
| 93 | 95 | void ScriptEngine::run() { |
| 94 | 96 | _isRunning = true; |
| 95 | 97 | QScriptEngine engine; |
| @@ -109,10 +111,14 @@ void ScriptEngine::run() { · 13 unmodified lines | ||
| 109 | 111 | QScriptValue particleScripterValue = engine.newQObject(&_particlesScriptingInterface); |
| 110 | 112 | engine.globalObject().setProperty("Particles", particleScripterValue); |
| 111 | 113 | |
| 114 | + | |
| 112 | 115 | QScriptValue soundConstructorValue = engine.newFunction(soundConstructor); |
| 113 | 116 | QScriptValue soundMetaObject = engine.newQMetaObject(&Sound::staticMetaObject, soundConstructorValue); |
| 114 | 117 | engine.globalObject().setProperty("Sound", soundMetaObject); |
| 115 | 118 | |
| 119 | + QScriptValue injectionOptionValue = engine.scriptValueFromQMetaObject<AudioInjectorOptions>(); | |
| 120 | + engine.globalObject().setProperty("AudioInjectionOptions", injectionOptionValue); | |
| 121 | + | |
| 116 | 122 | QScriptValue audioScriptingInterfaceValue = engine.newQObject(&_audioScriptingInterface); |
| 117 | 123 | engine.globalObject().setProperty("Audio", audioScriptingInterfaceValue); |
| 118 | 124 | |