Skip to content

Commit 9bb2755

Browse files
committed
fix(tutorial): keep day4 toolbar and mobile locks synced
1 parent 9868e37 commit 9bb2755

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

static/mmd-ui-buttons.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -725,6 +725,12 @@ MMDManager.prototype._startUIUpdateLoop = function() {
725725
buttonsContainer.style.visibility = suppressed ? 'hidden' : 'visible';
726726
buttonsContainer.style.opacity = suppressed ? '0' : '1';
727727
buttonsContainer.style.display = suppressed || this.isLocked ? 'none' : 'flex';
728+
if (lockIcon && !this._isInReturnState) {
729+
const shouldShowLock = !!(this._shouldShowMmdLockIcon && this._shouldShowMmdLockIcon());
730+
lockIcon.style.display = shouldShowLock ? 'block' : 'none';
731+
lockIcon.style.visibility = shouldShowLock ? 'visible' : 'hidden';
732+
lockIcon.style.opacity = shouldShowLock ? '' : '0';
733+
}
728734
} else {
729735
buttonsContainer.style.transformOrigin = 'left top';
730736
const screenWidth = window.innerWidth;

static/tutorial/yui-guide/director.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5841,6 +5841,12 @@
58415841
const sceneId = typeof normalizedScene.id === 'string'
58425842
? normalizedScene.id
58435843
: '';
5844+
const day4SettingsSceneIds = [
5845+
'day4_chat_settings',
5846+
'day4_model_behavior',
5847+
'day4_gaze_follow',
5848+
'day4_privacy_mode'
5849+
];
58445850
const day2SettingsSceneIds = [
58455851
'day2_personalization_space',
58465852
'day2_personalization_detail',
@@ -5851,7 +5857,11 @@
58515857
'day5_character_panic',
58525858
'day5_memory_entry'
58535859
];
5854-
if (day2SettingsSceneIds.includes(sceneId) || day5SettingsSceneIds.includes(sceneId)) {
5860+
if (
5861+
day2SettingsSceneIds.includes(sceneId)
5862+
|| day4SettingsSceneIds.includes(sceneId)
5863+
|| day5SettingsSceneIds.includes(sceneId)
5864+
) {
58555865
return true;
58565866
}
58575867

static/vrm-ui-buttons.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,12 @@ VRMManager.prototype._startUIUpdateLoop = function() {
628628
buttonsContainer.style.visibility = suppressed ? 'hidden' : 'visible';
629629
buttonsContainer.style.opacity = suppressed ? '0' : '1';
630630
buttonsContainer.style.display = suppressed || (this.interaction && this.interaction.checkLocked && this.interaction.checkLocked()) ? 'none' : 'flex';
631+
if (lockIcon && !this._isInReturnState) {
632+
const shouldShowLock = !!(this._shouldShowVrmLockIcon && this._shouldShowVrmLockIcon());
633+
lockIcon.style.display = shouldShowLock ? 'block' : 'none';
634+
lockIcon.style.visibility = shouldShowLock ? 'visible' : 'hidden';
635+
lockIcon.style.opacity = shouldShowLock ? '' : '0';
636+
}
631637
} else {
632638
buttonsContainer.style.transformOrigin = 'left top';
633639
const screenWidth = window.innerWidth;

0 commit comments

Comments
 (0)