public static void MultiPurchasePopup_Refresh_Postfix(SG_Stores_MultiPurchasePopup __instance, int ___costPerUnit, int ___quantityBeingSold, LocalizableText ___TitleText, LocalizableText ___DescriptionText, string ___itemName, HBSDOTweenButton ___ConfirmButton) { Mod.Log.Debug("SG_S_MPP:R entered."); int value = ___costPerUnit * ___quantityBeingSold; Mod.Log.Debug($"SG_S_MPP:R value:{value} = costPerUnit:{___costPerUnit} x quantityBeingSold:{___quantityBeingSold}."); string actionS = "??"; if (State.StoreIsBuying) { actionS = "BUY"; } else if (State.StoreIsSelling) { actionS = "SELL"; } Text titleT = new Text($"{actionS}: {___itemName}"); ___TitleText.SetText(titleT.ToString(), new object[] { }); Text descT = new Text($"{actionS} FOR <color=#F79B26>{SimGameState.GetCBillString(value)}</color>"); ___DescriptionText.SetText(descT.ToString(), new object[] { }); ___ConfirmButton.SetText(actionS); }
public static void ReplaceTitle(LocalizableText ___TitleText, LocalizableText ___DescriptionText, string ___itemName, int ___costPerUnit, int ___quantityBeingSold, HBSDOTweenButton ___ConfirmButton) { if (!SG_Stores_MultiPurchasePopup_Handler.Replace) { return; } ___TitleText.SetText($"{SG_Stores_MultiPurchasePopup_Handler.Text} {___itemName}"); var value = SimGameState.GetCBillString(___costPerUnit * ___quantityBeingSold); ___DescriptionText.SetText($"{SG_Stores_MultiPurchasePopup_Handler.Text} FOR <color=#F79B26>{value}</color>"); ___ConfirmButton.SetText(SG_Stores_MultiPurchasePopup_Handler.Text); }