mirror of
https://github.com/overte-org/overte.git
synced 2025-04-19 15:43:50 +02:00
- delete new AudioListenerMode menu on script ending
- style fix (function naming)
This commit is contained in:
parent
81932fe1d7
commit
dfb9034b4e
4 changed files with 6 additions and 5 deletions
|
@ -95,6 +95,7 @@ function setupMenus() {
|
|||
Menu.addMenuItem({ menuName: AUDIO_LISTENER_MODE_MENU, menuItemName: AUDIO_LISTENER_MODE_FROM_HEAD, isCheckable: true, isChecked: (MyAvatar.audioListenerMode === MyAvatar.FROM_HEAD) });
|
||||
Menu.addMenuItem({ menuName: AUDIO_LISTENER_MODE_MENU, menuItemName: AUDIO_LISTENER_MODE_FROM_CAMERA, isCheckable: true, isChecked: (MyAvatar.audioListenerMode === MyAvatar.FROM_CAMERA) });
|
||||
Menu.addMenuItem({ menuName: AUDIO_LISTENER_MODE_MENU, menuItemName: AUDIO_LISTENER_MODE_CUSTOM, isCheckable: true, isChecked: (MyAvatar.audioListenerMode === MyAvatar.CUSTOM) });
|
||||
createdAudioListenerModeMenu = true;
|
||||
}
|
||||
|
||||
if (!Menu.menuItemExists(AUDIO_MENU, AUDIO_STEREO_INPUT)) {
|
||||
|
|
|
@ -4024,7 +4024,7 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEngine* scri
|
|||
|
||||
// hook our avatar and avatar hash map object into this script engine
|
||||
scriptEngine->registerGlobalObject("MyAvatar", _myAvatar);
|
||||
qScriptRegisterMetaType(scriptEngine, maAudioListenModeToScriptValue, maAudioListenModeFromScriptValue);
|
||||
qScriptRegisterMetaType(scriptEngine, audioListenModeToScriptValue, audioListenModeFromScriptValue);
|
||||
|
||||
scriptEngine->registerGlobalObject("AvatarList", DependencyManager::get<AvatarManager>().data());
|
||||
|
||||
|
|
|
@ -1839,10 +1839,10 @@ void MyAvatar::setAudioListenerMode(AudioListenerMode audioListenerMode) {
|
|||
}
|
||||
}
|
||||
|
||||
QScriptValue maAudioListenModeToScriptValue(QScriptEngine* engine, const AudioListenerMode& audioListenerMode) {
|
||||
QScriptValue audioListenModeToScriptValue(QScriptEngine* engine, const AudioListenerMode& audioListenerMode) {
|
||||
return audioListenerMode;
|
||||
}
|
||||
|
||||
void maAudioListenModeFromScriptValue(const QScriptValue& object, AudioListenerMode& audioListenerMode) {
|
||||
void audioListenModeFromScriptValue(const QScriptValue& object, AudioListenerMode& audioListenerMode) {
|
||||
audioListenerMode = (AudioListenerMode)object.toUInt16();
|
||||
}
|
||||
|
|
|
@ -359,7 +359,7 @@ private:
|
|||
glm::quat _customListenOrientation;
|
||||
};
|
||||
|
||||
QScriptValue maAudioListenModeToScriptValue(QScriptEngine* engine, const AudioListenerMode& audioListenerMode);
|
||||
void maAudioListenModeFromScriptValue(const QScriptValue& object, AudioListenerMode& audioListenerMode);
|
||||
QScriptValue audioListenModeToScriptValue(QScriptEngine* engine, const AudioListenerMode& audioListenerMode);
|
||||
void audioListenModeFromScriptValue(const QScriptValue& object, AudioListenerMode& audioListenerMode);
|
||||
|
||||
#endif // hifi_MyAvatar_h
|
||||
|
|
Loading…
Reference in a new issue