mirror of
https://github.com/JulianGro/overte.git
synced 2025-05-08 05:49:57 +02:00
Read new Sound() arg
This commit is contained in:
parent
3baa992bc3
commit
f50b42fd16
1 changed files with 2 additions and 1 deletions
|
@ -48,7 +48,8 @@ EntityScriptingInterface ScriptEngine::_entityScriptingInterface;
|
||||||
|
|
||||||
static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) {
|
static QScriptValue soundConstructor(QScriptContext* context, QScriptEngine* engine) {
|
||||||
QUrl soundURL = QUrl(context->argument(0).toString());
|
QUrl soundURL = QUrl(context->argument(0).toString());
|
||||||
QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL), QScriptEngine::ScriptOwnership);
|
bool isStereo = context->argument(1).toBool();
|
||||||
|
QScriptValue soundScriptValue = engine->newQObject(new Sound(soundURL, isStereo), QScriptEngine::ScriptOwnership);
|
||||||
|
|
||||||
return soundScriptValue;
|
return soundScriptValue;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue