本文整理汇总了C#中UIGrid.CreateScrollView方法的典型用法代码示例。如果您正苦于以下问题:C# UIGrid.CreateScrollView方法的具体用法?C# UIGrid.CreateScrollView怎么用?C# UIGrid.CreateScrollView使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UIGrid
的用法示例。
在下文中一共展示了UIGrid.CreateScrollView方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnLoadedUI
public override void OnLoadedUI(bool close3dTouch, object args) {
base.OnLoadedUI(close3dTouch, args);
_btnEmoji = transform.Find("L/botton1").gameObject;
_btnItem = transform.Find("L/botton2").gameObject;
_btnPet = transform.Find("L/botton3").gameObject;
_btnTask = transform.Find("L/botton4").gameObject;
_btnHonor = transform.Find("L/botton5").gameObject;
_btnQuickTalk = transform.Find("L/botton6").gameObject;
_btnHistory = transform.Find("L/botton7").gameObject;
_emojiPanel = transform.Find("R/Emoji");
_gridEmoji = transform.Find("R/Emoji/Grid").GetComponent<UIGrid>();
_emojiTemplate = transform.Find("R/Emoji/emoji_template").gameObject;
_emojiTemplate.SetActive(false);
_emojiGridList = new GridItemList<EmojiListItem>(null, this);
_bagPanel = transform.Find("R/Bag");
_btnAllItem = transform.Find("R/Bag/bottom1").gameObject;
_btnPotionItem = transform.Find("R/Bag/bottom2").gameObject;
_gridBag = transform.Find("R/Bag/Scroll View/Grid").GetComponent<UIGrid>();
_petPanel = transform.Find("R/Pet");
_gridPet = transform.Find("R/Pet/Grid").GetComponent<UIGrid>();
_petTemplate = transform.Find("R/Pet/pet_template").gameObject;
_petTemplate.SetActive(false);
_taskPanel = transform.Find("R/quest");
_gridTask = transform.Find("R/quest/Grid").GetComponent<UIGrid>();
_taskTemplate = transform.Find("R/quest/quest_template").gameObject;
_taskTemplate.SetActive(false);
_honorPanel = transform.Find("R/chenghao");
_gridHonor = transform.Find("R/chenghao/Grid").GetComponent<UIGrid>();
_honorTemplate = transform.Find("R/chenghao/honor_template").gameObject;
_honorTemplate.SetActive(false);
_quickTalkPanel = transform.Find("R/massage");
_gridTalk = transform.Find("R/massage/Grid").GetComponent<UIGrid>();
_talkTemplate = transform.Find("R/massage/message_template").gameObject;
_historyPanel = transform.Find("R/History");
_gridHistory = transform.Find("R/History/Grid").GetComponent<UIGrid>();
_historyTemplate = transform.Find("R/History/history_template").gameObject;
_historyTemplate.SetActive(false);
_historyGridList = new GridItemList<ChatHistoryItem>(null, this);
_historyList = ChatDataManager.GetInstance().history;
_parentUI = GetParentUI<ChatDetailView>();
List<List<Transform>> contents = new List<List<Transform>>{
new List<Transform>{_emojiPanel},new List<Transform>{_bagPanel},
new List<Transform>{_petPanel},new List<Transform>{_taskPanel},
new List<Transform>{_honorPanel},new List<Transform>{_quickTalkPanel},
new List<Transform>{_historyPanel},
};
List<GameObject> activeButtons = new List<GameObject> {
_btnEmoji,_btnItem,_btnPet,_btnTask,_btnHonor,
_btnQuickTalk,_btnHistory,
};
_emojiNames = new List<string>();
_emojiNames.Add("000_2");
_emojiNames.Add("001_2");
_emojiNames.Add("002_2");
_gridEmoji.CreateScrollView<EmojiListItem>(_emojiTemplate, _emojiNames, _emojiGridList, GetParentUI<ChatDetailView>());
UIWidgetTools.RegistUITapButton(activeButtons, contents);
RegistUIButton(_btnHistory, (go) => {
RefreshHistory();
});
}
示例2: OnLoadedUI
public override void OnLoadedUI(bool close3dTouch, object args) {
base.OnLoadedUI(close3dTouch, args);
_closeButton = transform.Find("chat_forward/botton_close").gameObject;
_toggleSound = transform.Find("chat_forward/sound_swith").GetComponent<UIToggle>();
_chatTemplate = transform.Find("chat_forward/chat_scroll/chat_template").gameObject;
_tableChatPanel = transform.Find("chat_forward/chat_scroll/Table").GetComponent<UITable>();
_chatScrollView = transform.Find("chat_forward/chat_scroll").GetComponent<UIScrollView>();
_chatPanel = transform.Find("chat_forward/chat_scroll").GetComponent<UIPanel>();
_gridChanel = transform.Find("chat_forward/grid_chanel").GetComponent<UIGrid>();
_chanelTemplate = transform.Find("chat_forward/chanel_button_template").gameObject;
_sendButton = transform.Find("chat_forward/send_group/botton_send").gameObject;
_recordButton = transform.Find("chat_forward/send_group/botton_v").gameObject;
_inputBox = transform.Find("chat_forward/send_group").GetComponent<UIInput>();
_playTweeen = transform.Find("chat_forward/send_group/botton_menu").GetComponent<UIPlayTween>();
_popMenu = transform.Find("Panel/Pop");
_lockMessage = transform.Find("Panel/Message").gameObject;
_labelLock = transform.Find("Panel/Message/Label").GetComponent<UILabel>();
chatDataList = ChatDataManager.GetInstance().chatDataList;
_tablePosition = _tableChatPanel.transform.localPosition;
_scrollPosition = _chatScrollView.transform.localPosition;
_panelOffset = _chatPanel.clipOffset;
needIgnoreList = new List<Transform> { _popMenu, _playTweeen.transform };
_chatInfoItems = new TableItemList<ChatDetailItem>(null, this);
chatType = enumChatType.CHANEL_CURRENT;
HideLockMessage();
_popMenu.gameObject.SetActive(false);
_chanelTemplate.SetActive(false);
_chatTemplate.SetActive(false);
EventDelegate.Add(_inputBox.onChange, InputTextChange);
EventDelegate.Add(_toggleSound.onChange, () => {
_isAutoAudioList[(int)chatType] = _toggleSound.value;
});
_chatScrollView.onMomentumMove = () => {
if (CheckChatPanelBottom() && _lockMessgeNum > 0) {
RefreshChangeTap();
}
};
_gridChanel.CreateScrollView(_chanelTemplate, GameConst.ChanelList, FillChanelItem);
RegistUIBase<ChatUIPopMenu>(_popMenu);
RegistUIButton(_closeButton, CloseClick);
RegistUIButton(_sendButton, SendClick);
RegistUIButton(_recordButton, RecordClick);
RegistUIButton(_lockMessage, LockClick);
}