コード例 #1
0
 public static void DoTextField(GUIContent content)
 {
     if (TranslationHooksEnabled)
     {
         TranslationHooksEnabled = false;
         try
         {
             content.text    = TextTranslator.TranslateTextAlternate(content.text);
             content.tooltip = TextTranslator.TranslateTextAlternate(content.tooltip);
         }
         finally
         {
             TranslationHooksEnabled = true;
         }
     }
 }
コード例 #2
0
 public static void DoWindow(GUIContent title)
 {
     if (TranslationHooksEnabled)
     {
         TranslationHooksEnabled = false;
         try
         {
             title.text    = TextTranslator.TranslateTextAlternate(title.text);
             title.tooltip = TextTranslator.TranslateTextAlternate(title.tooltip);
         }
         finally
         {
             TranslationHooksEnabled = true;
         }
     }
 }
コード例 #3
0
 public static void DoLabel(GUIContent content, object __instance)
 {
     if (TranslationHooksEnabled)
     {
         TranslationHooksEnabled = false;
         try
         {
             content.text    = TextTranslator.TranslateTextAlternate(content.text);
             content.tooltip = TextTranslator.TranslateTextAlternate(content.tooltip);
         }
         finally
         {
             TranslationHooksEnabled = true;
         }
     }
 }
コード例 #4
0
 public static void DoButtonGrid(GUIContent[] contents)
 {
     if (TranslationHooksEnabled)
     {
         TranslationHooksEnabled = false;
         try
         {
             foreach (GUIContent content in contents)
             {
                 content.text    = TextTranslator.TranslateTextAlternate(content.text);
                 content.tooltip = TextTranslator.TranslateTextAlternate(content.tooltip);
             }
         }
         finally
         {
             TranslationHooksEnabled = true;
         }
     }
 }