@@ -450,54 +450,54 @@ private static VisualElement CreateTextSettingsSection()
450450
451451 // Package Initialization Status
452452 AddTextSubHeader ( section , "Package Initialization Status" ) ;
453- AddTextField ( section , textProperty , " initializingPackage" , "Initializing" ) ;
454- AddTextField ( section , textProperty , " gettingVersion" , "Getting Version" ) ;
455- AddTextField ( section , textProperty , " updatingManifest" , "Updating Manifest" ) ;
456- AddTextField ( section , textProperty , " checkingUpdate" , "Checking Update" ) ;
457- AddTextField ( section , textProperty , " downloadingResources" , "Downloading" ) ;
458- AddTextField ( section , textProperty , " packageCompleted" , "Completed" ) ;
459- AddTextField ( section , textProperty , " initializationFailed" , "Failed" ) ;
460- AddTextField ( section , textProperty , " unknownPackageStatus" , "Unknown Status" ) ;
453+ AddTextField ( section , textProperty , nameof ( BootstrapText . initializingPackage ) , "Initializing" ) ;
454+ AddTextField ( section , textProperty , nameof ( BootstrapText . gettingVersion ) , "Getting Version" ) ;
455+ AddTextField ( section , textProperty , nameof ( BootstrapText . updatingManifest ) , "Updating Manifest" ) ;
456+ AddTextField ( section , textProperty , nameof ( BootstrapText . checkingUpdate ) , "Checking Update" ) ;
457+ AddTextField ( section , textProperty , nameof ( BootstrapText . downloadingResources ) , "Downloading" ) ;
458+ AddTextField ( section , textProperty , nameof ( BootstrapText . packageCompleted ) , "Completed" ) ;
459+ AddTextField ( section , textProperty , nameof ( BootstrapText . initializationFailed ) , "Failed" ) ;
460+ AddTextField ( section , textProperty , nameof ( BootstrapText . unknownPackageStatus ) , "Unknown Status" ) ;
461461
462462 // Scene Load Status
463463 AddTextSubHeader ( section , "Scene Load Status" ) ;
464- AddTextField ( section , textProperty , " sceneLoading" , "Loading" ) ;
465- AddTextField ( section , textProperty , " sceneCompleted" , "Completed" ) ;
466- AddTextField ( section , textProperty , " sceneFailed" , "Failed" ) ;
467- AddTextField ( section , textProperty , " unknownSceneStatus" , "Unknown Status" ) ;
464+ AddTextField ( section , textProperty , nameof ( BootstrapText . sceneLoading ) , "Loading" ) ;
465+ AddTextField ( section , textProperty , nameof ( BootstrapText . sceneCompleted ) , "Completed" ) ;
466+ AddTextField ( section , textProperty , nameof ( BootstrapText . sceneFailed ) , "Failed" ) ;
467+ AddTextField ( section , textProperty , nameof ( BootstrapText . unknownSceneStatus ) , "Unknown Status" ) ;
468468
469469 // Inline Status
470470 AddTextSubHeader ( section , "Inline Status" ) ;
471- AddTextField ( section , textProperty , " initializing" , "Initializing" ) ;
472- AddTextField ( section , textProperty , " downloading" , "Downloading" ) ;
473- AddTextField ( section , textProperty , " downloadCompletedLoading" , "Download Done" ) ;
474- AddTextField ( section , textProperty , " loadingCode" , "Loading Code" ) ;
475- AddTextField ( section , textProperty , " decryptingResources" , "Decrypting" ) ;
476- AddTextField ( section , textProperty , " loadingScene" , "Loading Scene" ) ;
471+ AddTextField ( section , textProperty , nameof ( BootstrapText . initializing ) , "Initializing" ) ;
472+ AddTextField ( section , textProperty , nameof ( BootstrapText . downloading ) , "Downloading" ) ;
473+ AddTextField ( section , textProperty , nameof ( BootstrapText . downloadCompletedLoading ) , "Download Done" ) ;
474+ AddTextField ( section , textProperty , nameof ( BootstrapText . loadingCode ) , "Loading Code" ) ;
475+ AddTextField ( section , textProperty , nameof ( BootstrapText . decryptingResources ) , "Decrypting" ) ;
476+ AddTextField ( section , textProperty , nameof ( BootstrapText . loadingScene ) , "Loading Scene" ) ;
477477
478478 // Dialog Titles
479479 AddTextSubHeader ( section , "Dialog Titles" ) ;
480- AddTextField ( section , textProperty , " dialogTitleError" , "Error Title" ) ;
481- AddTextField ( section , textProperty , " dialogTitleWarning" , "Warning Title" ) ;
482- AddTextField ( section , textProperty , " dialogTitleNotice" , "Notice Title" ) ;
480+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogTitleError ) , "Error Title" ) ;
481+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogTitleWarning ) , "Warning Title" ) ;
482+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogTitleNotice ) , "Notice Title" ) ;
483483
484484 // Dialog Buttons
485485 AddTextSubHeader ( section , "Dialog Buttons" ) ;
486- AddTextField ( section , textProperty , " buttonOk" , "OK" ) ;
487- AddTextField ( section , textProperty , " buttonCancel" , "Cancel" ) ;
488- AddTextField ( section , textProperty , " buttonDownload" , "Download" ) ;
489- AddTextField ( section , textProperty , " buttonRetry" , "Retry" ) ;
490- AddTextField ( section , textProperty , " buttonExit" , "Exit" ) ;
486+ AddTextField ( section , textProperty , nameof ( BootstrapText . buttonOk ) , "OK" ) ;
487+ AddTextField ( section , textProperty , nameof ( BootstrapText . buttonCancel ) , "Cancel" ) ;
488+ AddTextField ( section , textProperty , nameof ( BootstrapText . buttonDownload ) , "Download" ) ;
489+ AddTextField ( section , textProperty , nameof ( BootstrapText . buttonRetry ) , "Retry" ) ;
490+ AddTextField ( section , textProperty , nameof ( BootstrapText . buttonExit ) , "Exit" ) ;
491491
492492 // Dialog Content
493493 AddTextSubHeader ( section , "Dialog Content (Format Strings)" ) ;
494- AddTextField ( section , textProperty , " dialogInitFailed" , "Init Failed" ) ;
495- AddTextField ( section , textProperty , " dialogDownloadPrompt" , "Download Prompt" ) ;
496- AddTextField ( section , textProperty , " dialogDownloadProgress" , "Download Progress" ) ;
497- AddTextField ( section , textProperty , " dialogSceneLoadFailed" , "Scene Failed" ) ;
498- AddTextField ( section , textProperty , " dialogInitException" , "Init Exception" ) ;
499- AddTextField ( section , textProperty , " dialogCodeException" , "Code Exception" ) ;
500- AddTextField ( section , textProperty , " dialogFunctionCallFailed" , "Call Failed" ) ;
494+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogInitFailed ) , "Init Failed" ) ;
495+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogDownloadPrompt ) , "Download Prompt" ) ;
496+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogDownloadProgress ) , "Download Progress" ) ;
497+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogSceneLoadFailed ) , "Scene Failed" ) ;
498+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogInitException ) , "Init Exception" ) ;
499+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogCodeException ) , "Code Exception" ) ;
500+ AddTextField ( section , textProperty , nameof ( BootstrapText . dialogFunctionCallFailed ) , "Call Failed" ) ;
501501
502502 // Reset to Defaults button
503503 var resetButton = new JButton ( "Reset to Defaults" , ( ) =>
@@ -540,12 +540,8 @@ private static void AddTextField(JSection section, SerializedProperty parentProp
540540 string fieldName , string label )
541541 {
542542 var prop = parentProperty . FindPropertyRelative ( fieldName ) ;
543- var textField = new JTextField ( prop . stringValue ) ;
544- textField . RegisterValueChangedCallback ( evt =>
545- {
546- prop . stringValue = evt . newValue ;
547- _serializedObject . ApplyModifiedProperties ( ) ;
548- } ) ;
543+ var textField = new JTextField ( ) ;
544+ textField . BindProperty ( prop ) ;
549545 section . Add ( new JFormField ( label , textField ) ) ;
550546 }
551547
0 commit comments