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; } } }
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; } } }
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; } } }
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; } } }