1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- public class MailItem : ItemRenderer
- {
- public Text titleTxt;
- public Text timeTxt;
- public MailPanel mailPanel;
- private CallBackUtil.SimpleCallBack clickHandler;
- public override object data {
- get {
- return base.data;
- }
- set {
- base.data = value;
- if (data == null)
- return;
- ChatMsg chatMsg = data as ChatMsg;
- switch(chatMsg.categovy)
- {
- case ChatMsg.Category.Request:
- titleTxt.text = Language.GetStr ("MailPanel", "friendRequestTitle").Replace("%NICK%", WWW.UnEscapeURL(chatMsg.content));
- clickHandler = FriendRequest;
- break;
- }
- }
- }
- public void OnClick()
- {
- if(this.data != null && clickHandler != null)
- clickHandler ();
- }
- private void FriendRequest()
- {
-
- }
- }
|