public void SetButtonInfos(List <ButtonInfoData> datas)
    {
        float num = (float)datas.get_Count() * 65f + 30f;

        PopButtonsAdjustUIView.Instance.SetBackgroundHeight(num);
        this.CheckBound(260, (int)num);
        this.ButtonInfos.Clear();
        if (datas == null)
        {
            return;
        }
        for (int i = 0; i < datas.get_Count(); i++)
        {
            ButtonInfoData    data = datas.get_Item(i);
            OOButtonInfo2MVVM oOButtonInfo2MVVM = new OOButtonInfo2MVVM();
            oOButtonInfo2MVVM.ButtonName     = data.buttonName;
            oOButtonInfo2MVVM.ButtonBg       = ButtonColorMgr.GetButton(data.color);
            oOButtonInfo2MVVM.IsShowRedPoint = data.isShowRedPoint;
            oOButtonInfo2MVVM.OnCallback     = delegate
            {
                PopButtonsAdjustUIView.Instance.Show(false);
                if (data.onCall != null)
                {
                    data.onCall.Invoke();
                }
            };
            this.ButtonInfos.Add(oOButtonInfo2MVVM);
        }
    }
 public void ShowAsConfirm(string title, string content, Action actionC, string nameC = "", string btnC = "button_orange_1", Transform root = null)
 {
     DialogExitUIViewModel.Open(root);
     this.m_actionConfirm      = actionC;
     this.BtnConfirmText       = ((!string.IsNullOrEmpty(nameC)) ? nameC : this.BtnConfirmText);
     this.Title                = title;
     this.Content              = content;
     this.ImageBtnC            = ButtonColorMgr.GetButton(btnC);
     this.BtnLeftVisibility    = false;
     this.BtnRightVisibility   = false;
     this.BtnConfirmVisibility = true;
 }
Ejemplo n.º 3
0
 public void ShowAsConfirm(string title, List <MultiCheckUIViewModel.ItemData> list, Action actionC, string nameC = "", string btnC = "button_orange_1", Transform root = null, string contentTip = "")
 {
     MultiCheckUIView.Instance.SetMask(0.7f, true, true);
     MultiCheckUIViewModel.Open(root);
     this.Title                = title;
     this.m_actionConfirm      = actionC;
     this.ImageBtnC            = ButtonColorMgr.GetButton(btnC);
     this.BtnConfirmText       = ((!string.IsNullOrEmpty(nameC)) ? nameC : this.BtnConfirmText);
     this.ContentTipText       = contentTip;
     this.BtnLeftVisibility    = false;
     this.BtnRightVisibility   = false;
     this.BtnConfirmVisibility = true;
     this.SetItems(list);
 }
 public void ShowAsConfirm(string title, string content, Action actionC, string nameC = "", string btnC = "button_orange_1")
 {
     GlobalReliveDialogUIViewModel.Open();
     GlobalReliveDialogUIView.Instance.SetMask(0.7f, true, true);
     this.m_actionConfirm    = actionC;
     this.ContentVisibility  = true;
     this.Content1Visibility = false;
     this.BtnConfirmText     = ((!string.IsNullOrEmpty(nameC)) ? nameC : this.BtnConfirmText);
     this.Title                = title;
     this.Content              = content;
     this.ImageBtnC            = ButtonColorMgr.GetButton(btnC);
     this.BtnLeftVisibility    = false;
     this.BtnRightVisibility   = false;
     this.BtnConfirmVisibility = true;
     GlobalReliveDialogUIView.Instance.isClick = false;
 }
 public void ShowAsOKCancel(string title, string content, Action actionL, Action actionR, string nameL = "取 消", string nameR = "确 定", string btnL = "button_orange_1", string btnR = "button_orange_1", Transform root = null)
 {
     DialogExitUIViewModel.Open(root);
     this.m_actionL            = actionL;
     this.m_actionR            = actionR;
     this.BtnRclose            = true;
     this.BtnLeftText          = ((!string.IsNullOrEmpty(nameL)) ? nameL : this.BtnLeftText);
     this.BtnRightText         = ((!string.IsNullOrEmpty(nameR)) ? nameR : this.BtnRightText);
     this.Title                = title;
     this.Content              = content;
     this.ImageBtnL            = ButtonColorMgr.GetButton(btnL);
     this.ImageBtnR            = ButtonColorMgr.GetButton(btnR);
     this.BtnLeftVisibility    = true;
     this.BtnRightVisibility   = true;
     this.BtnConfirmVisibility = false;
 }
Ejemplo n.º 6
0
 public void ShowAsConfirm(string title, string content, Action actionConfirm, Action actionClose, bool isClickMask = true, string nameC = "", string btnC = "button_orange_1", Transform root = null)
 {
     DialogBoxUIView.Instance.SetMask(0.7f, true, isClickMask);
     DialogBoxUIViewModel.Open(root);
     this.m_actionConfirm    = actionConfirm;
     this.m_actionClose      = actionClose;
     this.ContentVisibility  = true;
     this.Content1Visibility = false;
     this.Content2Visibility = false;
     this.BtnConfirmText     = ((!string.IsNullOrEmpty(nameC)) ? nameC : this.BtnConfirmText);
     this.Title                         = title;
     this.Content                       = content;
     this.ImageBtnC                     = ButtonColorMgr.GetButton(btnC);
     this.BtnLeftVisibility             = false;
     this.BtnRightVisibility            = false;
     this.BtnConfirmVisibility          = true;
     this.ToggleDontShowAgainVisibility = false;
 }
 public void ShowAsOKCancel(string title, string content, Action actionL, Action actionR, string nameL = "取 消", string nameR = "确 定", string btnL = "button_orange_1", string btnR = "button_yellow_1")
 {
     GlobalReliveDialogUIViewModel.Open();
     this.m_actionL            = actionL;
     this.m_actionR            = actionR;
     this.BtnRclose            = true;
     this.BtnLeftText          = ((!string.IsNullOrEmpty(nameL)) ? nameL : this.BtnLeftText);
     this.BtnRightText         = ((!string.IsNullOrEmpty(nameR)) ? nameR : this.BtnRightText);
     this.Title                = title;
     this.ContentVisibility    = true;
     this.Content1Visibility   = false;
     this.Content              = content;
     this.ImageBtnL            = ButtonColorMgr.GetButton(btnL);
     this.ImageBtnR            = ButtonColorMgr.GetButton(btnR);
     this.BtnLeftVisibility    = true;
     this.BtnRightVisibility   = true;
     this.BtnConfirmVisibility = false;
     GlobalReliveDialogUIView.Instance.isClick = false;
 }
 public void ShowAsOKCancel(string title, string content, Action actionL, Action actionR, string nameL = "取 消", string nameR = "确 定", string btnL = "button_orange_1", string btnR = "button_yellow_1", Transform root = null, bool isShowCloseBtn = true)
 {
     GlobalBattleDialogUIViewModel.Open(root);
     this.m_actionL                     = actionL;
     this.m_actionR                     = actionR;
     this.BtnRclose                     = true;
     this.BtnLeftText                   = ((!string.IsNullOrEmpty(nameL)) ? nameL : this.BtnLeftText);
     this.BtnRightText                  = ((!string.IsNullOrEmpty(nameR)) ? nameR : this.BtnRightText);
     this.Title                         = title;
     this.ContentVisibility             = true;
     this.Content1Visibility            = false;
     this.Content2Visibility            = false;
     this.Content                       = content;
     this.ImageBtnL                     = ButtonColorMgr.GetButton(btnL);
     this.ImageBtnR                     = ButtonColorMgr.GetButton(btnR);
     this.BtnLeftVisibility             = true;
     this.BtnRightVisibility            = true;
     this.BtnConfirmVisibility          = false;
     this.BtnCloseVisibility            = isShowCloseBtn;
     this.ToggleDontShowAgainVisibility = false;
 }
 public void SetButtonInfos(List <ButtonInfoData> datas)
 {
     this.ButtonInfos.Clear();
     if (datas == null)
     {
         return;
     }
     for (int i = 0; i < datas.get_Count(); i++)
     {
         ButtonInfoData    data = datas.get_Item(i);
         OOButtonInfo2MVVM oOButtonInfo2MVVM = new OOButtonInfo2MVVM();
         oOButtonInfo2MVVM.ButtonName = data.buttonName;
         oOButtonInfo2MVVM.ButtonBg   = ButtonColorMgr.GetButton(data.color);
         oOButtonInfo2MVVM.OnCallback = delegate
         {
             PopButtonsUIView.Instance.Show(false);
             if (data.onCall != null)
             {
                 data.onCall.Invoke();
             }
         };
         this.ButtonInfos.Add(oOButtonInfo2MVVM);
     }
 }
Ejemplo n.º 10
0
 public void SetButtonEnable(bool bEnable)
 {
     ButtonColorMgr.SetButtonEnable(bEnable, this.m_ButtonCustom, this.m_spBg, null);
 }
Ejemplo n.º 11
0
 public void SetButtonBg(int color = 1)
 {
     ResourceManager.SetSprite(this.m_spBg, ButtonColorMgr.GetButton(color));
 }