few fixes

This commit is contained in:
Gurge44 committed 2026-10-09 09:11:27 +02:00
1 parent ed6ebed013
commit bedb16d1a1
7 files changed
+49 -23

No files matched your search

+13 -6
View File
@@ -58,9 +58,7 @@ public static class TextBoxPatch
{
Destroy();
IsInvalidCommand = false;
Color textColor = Main.DarkTheme.Value ? Color.white : Color.black;
__instance.compoText.Color(textColor);
__instance.outputText.color = textColor;
ResetTextColor(__instance);
return;
}
@@ -126,9 +124,7 @@ public static class TextBoxPatch
if (IsInvalidCommand)
{
IsInvalidCommand = false;
Color textColor = Main.DarkTheme.Value ? Color.white : Color.black;
__instance.compoText.Color(textColor);
__instance.outputText.color = textColor;
ResetTextColor(__instance);
}
HudManager hud = HudManager.Instance;
@@ -300,6 +296,17 @@ public static class TextBoxPatch
}
}
private static void ResetTextColor(TextBoxTMP __instance)
{
#if IL2CPP
Color textColor = Color.black;
#else
Color textColor = Main.DarkTheme.Value ? Color.white : Color.black;
#endif
__instance.compoText.Color(textColor);
__instance.outputText.color = textColor;
}
public static void OnTabPress(ChatController __instance)
{
if (!PlaceHolderText || PlaceHolderText.text == "") return;