コード例 #1
0
        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);
            }
        }
コード例 #2
0
        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();
        }
    }
コード例 #4
0
        internal static bool Prefix(CustomizeCarColorsMenuLogic __instance)
        {
            CustomizeMenuCompoundData data = __instance.GetComponent <CustomizeMenuCompoundData>();

            return(!(data && data.IsEditing));
        }