コード例 #1
0
        public JoyUIButton MapUI(GameObject uiObject)
        {
            if (uiObject == null)
            {
                LogModule.ErrorLog("you are mapping a null object");
            }
            JoyUIButton jbtn = GCGame.Utils.BindObjToParent(prefab.gameObject, Root, "_" + uiObject.name).GetComponent <JoyUIButton>();

            jbtn.CorrespondingButton = uiObject;
            return(jbtn);
        }
コード例 #2
0
 public void AttachCursor(JoyUIButton joyuibutton)
 {
     CurrentUIButton = joyuibutton;
     _DoAttachCursor(joyuibutton.CorrespondingButton);
     joyuibutton.SendMessage("OnHover", SendMessageOptions.DontRequireReceiver);
 }
コード例 #3
0
        /// <summary>
        /// 为curuibtn 添加跳转功能,即按键以后选中名为othername的按钮
        /// </summary>
        /// <param name="curuibtn"></param>
        /// <param name="othername"></param>
        public void AttachGotoFunction(JoyUIButton curuibtn, string othername)
        {
            JoyUIChangeFocus jucf = curuibtn.gameObject.AddComponent <JoyUIChangeFocus>();

            jucf.other = GameObject.Find(othername).GetComponent <JoyUIButton>();
        }
コード例 #4
0
 void OnEnable()
 {
     s_currentButton = this;
 }