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); }
public void AttachCursor(JoyUIButton joyuibutton) { CurrentUIButton = joyuibutton; _DoAttachCursor(joyuibutton.CorrespondingButton); joyuibutton.SendMessage("OnHover", SendMessageOptions.DontRequireReceiver); }
/// <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>(); }
void OnEnable() { s_currentButton = this; }