internal static void Postfix(CustomizeCarColorsMenuLogic __instance, ColorChanger.ColorType colorType) { CustomizeMenuCompoundData data = __instance.GetComponent <CustomizeMenuCompoundData>(); if (data && Mod.Instance.Config.EnableHexColorInput) { data.ColorType = colorType; __instance.SetThirdActionEnabled(true); __instance.SetThirdAction("EDIT", InternalResources.Constants.INPUT_EDIT_COLOR, data.EditHexClick); } }
internal static void Postfix(CustomizeCarColorsMenuLogic __instance) { CustomizeMenuCompoundData data = __instance.GetComponent <CustomizeMenuCompoundData>(); if (data) { data.ColorType = ColorChanger.ColorType.Size_; __instance.SetThirdActionEnabled(false); __instance.SetThirdAction(string.Empty, InputAction.MenuDoNotUse, null); } }
public static void SetThirdAction(this CustomizeCarColorsMenuLogic menu, string text, InputAction input, Action callback) { CustomizeMenuCompoundData data = menu.GetComponent <CustomizeMenuCompoundData>(); if (data) { data.OnButtonClick = callback; menu.deleteButton_.GetComponentInChildren <UILabel>().text = text; ControlsBasedUITexture texture = menu.deleteButton_.GetComponent <ControlsBasedUITexture>(); texture.inputAction_ = input; texture.EvaluateLatestUsedDevice(); } }
internal static bool Prefix(CustomizeCarColorsMenuLogic __instance) { CustomizeMenuCompoundData data = __instance.GetComponent <CustomizeMenuCompoundData>(); return(!(data && data.IsEditing)); }