Inheritance: UnityEngine.MonoBehaviour
Beispiel #1
0
        private void AddUserMenuBtn(String pTitle, Action pAction)
        {
            GameObject objSubs = Instantiate(Resources.Load(PREFAB_USER_MENU_BTN)) as GameObject;
            UserProfileBtnController controllerSubs = objSubs.GetComponentInChildren <UserProfileBtnController>();

            controllerSubs.InitScreen(pTitle, pAction);
            objSubs.transform.SetParent(_btnDropDownObj.transform);
            Resizer.SetDefScale(objSubs);
        }
        public void InitScreen(XsollaUtils pUtils)
        {
            // set title
            _titleProj.text = pUtils.GetProject().name;

            // user name
            _userName.text = pUtils.GetUser().GetName();

            if (pUtils.GetUser().virtualCurrencyBalance != null)
            {
                GameObject obj = Instantiate(Resources.Load(PREFAB_VIEW_MENU_ITEM_EMPTY)) as GameObject;
                UserProfileBtnController controller = obj.GetComponentInChildren <UserProfileBtnController>();
                controller.InitScreen("History", ShowHistory);
                obj.transform.SetParent(_btnDropDownObj.transform);
            }
        }
 public void AddBtn(UserProfileBtnController pBtn)
 {
     listBtn.Add(pBtn);
 }
Beispiel #4
0
 public void AddBtn(UserProfileBtnController pBtn)
 {
     listBtn.Add(pBtn);
 }