public void InitMenuItems() { _root = new MenuItemGrid("chatBlock", 1, 10); _headerItem = new MenuItemText("headerChat"); _root.AddChild(0, 0, 1, 1, _headerItem); _headerItem.SetText("None"); _headerItem.SetFontSize(2, 20); _headerItem.SetAlignment(UnityEngine.TextAnchor.MiddleLeft); _chatItem = new MenuItemScrollable("chatScrollable", UnityEngine.TextAnchor.LowerCenter); _root.AddChild(0, 1, 1, 7, _chatItem); _bottomBlock = new MenuItemGrid("bottomPartChatBlock", 5, 1); _root.AddChild(0, 8, 1, 2, _bottomBlock); _msgInput = new MenuItemInput("chatMsgInput"); _bottomBlock.AddChild(0, 0, 4, 1, _msgInput); _msgInput.SetPlaceholder("Message..."); _msgInput.SetLineType(UnityEngine.UI.InputField.LineType.MultiLineSubmit); _msgInput.onSubmit += OnSendClicked; _sendButton = new MenuItemButton("chatSendButton"); _bottomBlock.AddChild(4, 0, 1, 1, _sendButton); _sendButton.SetText("Send"); _sendButton.Clicked += OnSendClicked; }
public void InitMenuItems() { _root = new MenuItemScrollable("chatRecentBlock", UnityEngine.TextAnchor.UpperCenter); }
private void InitMenuItems() { _root = new MenuItemScrollable("friendsBlock", UnityEngine.TextAnchor.UpperCenter); }