@@ -131,6 +131,11 @@ public float musicVolume
131
131
}
132
132
133
133
PlayerPrefs . SetFloat ( k_MusicPref , value ) ;
134
+
135
+ if ( AudioManager . instance != null )
136
+ {
137
+ AudioManager . instance . SetMusicVolume ( value ) ;
138
+ }
134
139
Notify ( ) ;
135
140
}
136
141
}
@@ -217,6 +222,8 @@ class MainView : MonoBehaviour
217
222
Button m_InGameSettingsButton ;
218
223
VisualElement m_LastView ;
219
224
LetterCardListModel m_Model = new ( ) ;
225
+
226
+ // Label m_AnswerLabel;
220
227
221
228
Gameplay . DifficultyLevel m_SelectedDifficultyLevel = Gameplay . DifficultyLevel . Hard ;
222
229
@@ -436,24 +443,29 @@ void SetupUI()
436
443
m_PlayerSettings . Notify ( "boldTextEnabledText" ) ;
437
444
m_PlayerSettings . Notify ( "closedCaptionsEnabledText" ) ;
438
445
439
- // Update text direction
440
- if ( loc . Identifier . CultureInfo . TextInfo . IsRightToLeft )
441
- root . languageDirection = LanguageDirection . RTL ;
442
- else
443
- root . languageDirection = LanguageDirection . LTR ;
444
- UpdateUSSLangDirection ( root ) ;
446
+ UpdateLangDirection ( root ) ;
445
447
} ;
446
448
447
- UpdateUSSLangDirection ( root ) ;
449
+ UpdateLangDirection ( root ) ;
448
450
ShowSplash ( ) ;
451
+
452
+ //root.Add(m_AnswerLabel = new Label());
453
+ //m_AnswerLabel.style.position = Position.Absolute;
454
+
449
455
}
450
456
451
- void UpdateUSSLangDirection ( VisualElement root )
457
+ void UpdateLangDirection ( VisualElement root )
452
458
{
453
459
if ( root . panel == null )
454
460
return ;
455
- root . panel . visualTree . EnableInClassList ( "lsp-dir-ltr" , LocalizationSettings . SelectedLocale ? . Identifier . CultureInfo . TextInfo . IsRightToLeft == false ) ;
456
- root . panel . visualTree . EnableInClassList ( "lsp-dir-rtl" , LocalizationSettings . SelectedLocale ? . Identifier . CultureInfo . TextInfo . IsRightToLeft == true ) ;
461
+
462
+ bool isRightToLeft = LocalizationSettings . SelectedLocale ? . Identifier . CultureInfo . TextInfo . IsRightToLeft ?? false ;
463
+
464
+ // Update text direction
465
+ root . languageDirection = isRightToLeft ? LanguageDirection . RTL : LanguageDirection . LTR ;
466
+ root . panel . visualTree . EnableInClassList ( "lsp-dir-ltr" , ! isRightToLeft ) ;
467
+ root . panel . visualTree . EnableInClassList ( "lsp-dir-rtl" , isRightToLeft ) ;
468
+ gameplay . rightToLeft = isRightToLeft ;
457
469
}
458
470
459
471
void OnEnable ( )
@@ -530,6 +542,7 @@ public void ShowNextWord()
530
542
DelayStateTheLetters ( ) ;
531
543
}
532
544
545
+ //m_AnswerLabel.text = gameplay.currentWord.word;
533
546
AccessibilityManager . GetService < UITkAccessibilityService > ( ) ? . RebuildHierarchy ( ) ;
534
547
}
535
548
0 commit comments