mirror of
https://github.com/All-Of-Us-Mods/MiraAPI.git
synced 2026-10-20 01:46:15 +00:00
Fix color not applying on game mode name
This commit is contained in:
1 parent
f7de7f127d
commit
ac87003d0a
2 files changed
+3
-2
No files matched your search
@@ -1,5 +1,6 @@
|
||||
using HarmonyLib;
|
||||
using MiraAPI.GameModes;
|
||||
using Reactor.Utilities.Extensions;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -33,7 +34,7 @@ internal static class HudPatches
|
||||
gmText.SetActive(false);
|
||||
modelText.SetActive(false);
|
||||
_text = gmTextClone.GetComponent<TextMeshPro>();
|
||||
_text.text = CustomGameModeManager.ActiveMode?.Name ?? "Classic";
|
||||
_text.text = CustomGameModeManager.ActiveMode != null ? $"<color=#{CustomGameModeManager.ActiveMode.Color.ToHtmlStringRGBA()}>{CustomGameModeManager.ActiveMode.Name}</color>" : "Classic";
|
||||
}
|
||||
|
||||
private static TextMeshPro? _text;
|
||||
|
||||
@@ -354,7 +354,7 @@ public static class LobbyViewPanePatches
|
||||
if (viewSettingsInfoPanel.titleText.text.Contains("Game Mode"))
|
||||
{
|
||||
viewSettingsInfoPanel.titleText.text = TranslationController.Instance.GetString(
|
||||
data.Title, $"<color=#{CustomGameModeManager.ActiveMode?.Color.ToHtmlStringRGBA()}>{CustomGameModeManager.ActiveMode}</color>"
|
||||
data.Title, CustomGameModeManager.ActiveMode != null ? $"<color=#{CustomGameModeManager.ActiveMode.Color.ToHtmlStringRGBA()}>{CustomGameModeManager.ActiveMode.Name}</color>" : "Classic"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user