@@ -178,7 +178,7 @@ public float displaySize
178
178
179
179
public event EventHandler < BindablePropertyChangedEventArgs > propertyChanged ;
180
180
181
- void Notify ( [ CallerMemberName ] string property = "" )
181
+ public void Notify ( [ CallerMemberName ] string property = "" )
182
182
{
183
183
propertyChanged ? . Invoke ( this , new BindablePropertyChangedEventArgs ( property ) ) ;
184
184
}
@@ -357,7 +357,12 @@ void SetupUI()
357
357
m_GameView = m_StackView . Q ( "gameView" ) ;
358
358
359
359
m_ClueLabel = m_GameView . Q < Label > ( "clueLabel" ) ;
360
- m_ClueLabel . GetOrCreateAccessibleProperties ( ) . label = LocalizationSettings . StringDatabase . GetLocalizedString ( "Game Text" , "CLUE_LABEL" ) ;
360
+ var localizedClue = new LocalizedString
361
+ {
362
+ TableReference = "Game Text" ,
363
+ TableEntryReference = "CLUE_LABEL"
364
+ } ;
365
+ localizedClue . StringChanged += s => m_ClueLabel . GetOrCreateAccessibleProperties ( ) . label = s ;
361
366
362
367
m_SuccessPill = m_GameView . Q ( "successPill" ) ;
363
368
m_SuccessPill . GetOrCreateAccessibleProperties ( ) . ignored = true ;
@@ -368,7 +373,12 @@ void SetupUI()
368
373
369
374
m_PauseGameButton = m_GameView . Q < Button > ( "pauseGameButton" ) ;
370
375
m_PauseGameButton . clicked += ShowExitGamePopup ;
371
- m_PauseGameButton . GetOrCreateAccessibleProperties ( ) . label = LocalizationSettings . StringDatabase . GetLocalizedString ( "Game Text" , "PAUSE_LABEL" ) ;
376
+ var localizedPause = new LocalizedString
377
+ {
378
+ TableReference = "Game Text" ,
379
+ TableEntryReference = "PAUSE_LABEL"
380
+ } ;
381
+ localizedPause . StringChanged += s => m_PauseGameButton . GetOrCreateAccessibleProperties ( ) . label = s ;
372
382
373
383
m_NextWordButton = m_GameView . Q < Button > ( "nextWordButton" ) ;
374
384
m_NextWordButton . clicked += ShowNextWord ;
@@ -416,6 +426,13 @@ void SetupUI()
416
426
OnClosedCaptioningStatusChanged ( AccessibilitySettings . isClosedCaptioningEnabled ) ;
417
427
OnFontScaleValueChanged ( AccessibilitySettings . fontScale ) ;
418
428
429
+ LocalizationSettings . SelectedLocaleChanged += loc =>
430
+ {
431
+ // Trigger the bound strings to update.
432
+ m_PlayerSettings . Notify ( "boldTextEnabledText" ) ;
433
+ m_PlayerSettings . Notify ( "closedCaptionsEnabledText" ) ;
434
+ } ;
435
+
419
436
ShowSplash ( ) ;
420
437
}
421
438
0 commit comments