@@ -131,6 +131,11 @@ public float musicVolume
131131 }
132132
133133 PlayerPrefs . SetFloat ( k_MusicPref , value ) ;
134+
135+ if ( AudioManager . instance != null )
136+ {
137+ AudioManager . instance . SetMusicVolume ( value ) ;
138+ }
134139 Notify ( ) ;
135140 }
136141 }
@@ -217,6 +222,8 @@ class MainView : MonoBehaviour
217222 Button m_InGameSettingsButton ;
218223 VisualElement m_LastView ;
219224 LetterCardListModel m_Model = new ( ) ;
225+
226+ // Label m_AnswerLabel;
220227
221228 Gameplay . DifficultyLevel m_SelectedDifficultyLevel = Gameplay . DifficultyLevel . Hard ;
222229
@@ -436,24 +443,29 @@ void SetupUI()
436443 m_PlayerSettings . Notify ( "boldTextEnabledText" ) ;
437444 m_PlayerSettings . Notify ( "closedCaptionsEnabledText" ) ;
438445
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 ) ;
445447 } ;
446448
447- UpdateUSSLangDirection ( root ) ;
449+ UpdateLangDirection ( root ) ;
448450 ShowSplash ( ) ;
451+
452+ //root.Add(m_AnswerLabel = new Label());
453+ //m_AnswerLabel.style.position = Position.Absolute;
454+
449455 }
450456
451- void UpdateUSSLangDirection ( VisualElement root )
457+ void UpdateLangDirection ( VisualElement root )
452458 {
453459 if ( root . panel == null )
454460 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 ;
457469 }
458470
459471 void OnEnable ( )
@@ -530,6 +542,7 @@ public void ShowNextWord()
530542 DelayStateTheLetters ( ) ;
531543 }
532544
545+ //m_AnswerLabel.text = gameplay.currentWord.word;
533546 AccessibilityManager . GetService < UITkAccessibilityService > ( ) ? . RebuildHierarchy ( ) ;
534547 }
535548
0 commit comments