static public int SetVirtual(IntPtr l) { try { FairyGUI.GList self = (FairyGUI.GList)checkSelf(l); self.SetVirtual(); pushValue(l, true); return(1); } catch (Exception e) { return(error(l, e)); } }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); //GComponent g1 = GameObject.Find("UIPanel1").GetComponent<UIPanel>().ui; GComponent g2 = GameObject.Find("UIPanel2").GetComponent<UIPanel>().ui; _list = g2.GetChild("mailList").asList; _list.SetVirtual(); _list.itemRenderer = (int index, GObject obj) => { obj.text = index + " Mail title here"; }; _list.numItems = 20; }
static int SetVirtual(IntPtr L) { try { ToLua.CheckArgsCount(L, 1); FairyGUI.GList obj = (FairyGUI.GList)ToLua.CheckObject(L, 1, typeof(FairyGUI.GList)); obj.SetVirtual(); return(0); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _mainView = this.GetComponent<UIPanel>().ui; _mainView.GetChild("n6").onClick.Add(() => { _list.AddSelection(500, true); }); _mainView.GetChild("n7").onClick.Add(() => { _list.scrollPane.ScrollTop(); }); _mainView.GetChild("n8").onClick.Add(() => { _list.scrollPane.ScrollBottom(); }); _list = _mainView.GetChild("mailList").asList; _list.SetVirtual(); _list.itemRenderer = RenderListItem; _list.numItems = 1000; }
void Start() { Application.targetFrameRate = 60; GRoot.inst.SetContentScaleFactor(1136, 640); Stage.inst.onKeyDown.Add(OnKeyDown); UIPackage.AddPackage("UI/Perspective"); _mainView = UIPackage.CreateObject("Perspective", "Main").asCom; _mainView.AddRelation(GRoot.inst, RelationType.Size); GRoot.inst.AddChild(_mainView); //GComponent g1 = GameObject.Find("UIPanel1").GetComponent<UIPanel>().ui; GComponent g2 = GameObject.Find("UIPanel2").GetComponent<UIPanel>().ui; _list = g2.GetChild("mailList").asList; _list.SetVirtual(); _list.itemRenderer = (int index, GObject obj) => { obj.text = index + " Mail title here"; }; _list.numItems = 20; }
void Start() { Application.targetFrameRate = 60; Stage.inst.onKeyDown.Add(OnKeyDown); _itemURL1 = UIPackage.GetItemURL("EmojiPro", "chatLeft"); _itemURL2 = UIPackage.GetItemURL("EmojiPro", "chatRight"); _messages = new List<Message>(); _mainView = this.GetComponent<UIPanel>().ui; _list = _mainView.GetChild("list").asList; _list.defaultItem = _itemURL1; _list.SetVirtual(); _list.itemProvider = GetListItemResource; _list.itemRenderer = RenderListItem; _input = _mainView.GetChild("input").asTextInput; _input.onKeyDown.Add(__inputKeyDown); //作为demo,这里只添加了部分表情素材 _emojies = new Dictionary<uint, Emoji>(); for (uint i = 0x1f600; i < 0x1f637; i++) { string url = UIPackage.GetItemURL("EmojiPro", Convert.ToString(i, 16)); if (url != null) _emojies.Add(i, new Emoji(url)); } _input.emojies = _emojies; _mainView.GetChild("btnSend").onClick.Add(__clickSendBtn); }
void Start() { _mainView = this.GetComponent<UIPanel>().ui; _list = _mainView.GetChild("list").asList; _list.itemRenderer = RenderListItem; _list.SetVirtual(); _list.numItems = 1000; _list.onTouchBegin.Add(OnClickList); _mainView.GetChild("box").asCom.onDrop.Add(OnDrop); LongPressGesture gesture = new LongPressGesture(_list); gesture.once = true; gesture.trigger = 1f; gesture.onAction.Add(OnLongPress); }