Wire a placeholder into the wiki search box so clearing an empty box works

This commit is contained in:
ReAdmin committed 2026-10-07 02:32:42 -07:00
1 parent 9cefeebe2b
commit 5d9c38a503
2 files changed
+8

No files matched your search

+7
View File
@@ -296,7 +296,14 @@ public static class RoleGuidePatches
RefreshActiveTab(true);
}));
var placeholder = Object.Instantiate(tmpText, tmpText.transform.parent);
placeholder.name = "Placeholder";
placeholder.color = new Color(0.55f, 0.55f, 0.55f);
placeholder.text = MiraLocaleManager.Get("MiraApi.Wiki.SearchPlaceholder");
placeholder.GetComponent<TextTranslatorTMP>()?.Destroy();
_searchBoxTmp.placeholderText = placeholder;
_searchBoxTmp.transform.localPosition = new Vector3(-1.438f, 0.756f, -0.2f);
_searchBoxTmp.Clear();
var playerButton = __instance.TabButtons[0];
SetupTabButton(
+1
View File
@@ -55,4 +55,5 @@ Outlive the timer or eliminate the crew.</string>
<string name="Options">Options</string>
<string name="MiraApi.Wiki.PlayersTab">Player List</string>
<string name="MiraApi.Wiki.SettingsTab">Game Settings</string>
<string name="MiraApi.Wiki.SearchPlaceholder">Search...</string>
</resources>