public static void TipsPatch(UIGeneralTips __instance) { if (UIGame.viewMode == EViewMode.Build) { int mode = __instance.gameData.mainPlayer.controller.cmd.mode; if (mode == -1) // 拆除模式 { __instance.modeText.text = "拆除模式".Translate() + $" {FindBuildDistance.Value.ToString("0")}"; } else if (mode >= 0) // 建造模式 { if (BuildPatch.begin) { __instance.modeText.text = "建造模式".Translate() + $" {BuildExtraSpacing.Value}"; } } } }
public static void Postfix(UIGeneralTips __instance) { Text modeText = Traverse.Create((object)__instance).Field("modeText").GetValue <Text>(); if (autoNav.enable) { modeText.gameObject.SetActive(true); modeText.rectTransform.anchoredPosition = anchoredPosition; if (autoNav.IsCurNavPlanet()) { modeText.text = "星际自动导航".ModText(); } else if (autoNav.IsCurNavStar()) { modeText.text = "星系自动导航".ModText(); } autoNav.modeText = modeText; } }
public static void Postfix(UIGeneralTips __instance) { if (!s_NavigateInstance.enable) { return; } Text modeText = Traverse.Create((object)__instance).Field("modeText").GetValue <Text>(); modeText.gameObject.SetActive(true); modeText.rectTransform.anchoredPosition = anchoredPosition; if (s_NavigateInstance.IsCurNavPlanet) { modeText.text = "星际自动导航".ModText(); } else if (s_NavigateInstance.IsCurNavStar) { modeText.text = "星系自动导航".ModText(); } s_NavigateInstance.modeText = modeText; }