FairyGUI.GList.GetSelection C# (CSharp) Method

GetSelection() public method

public GetSelection ( ) : List
return List
        public List<int> GetSelection()
        {
            List<int> ret = new List<int>();
            int cnt = _children.Count;
            for (int i = 0; i < cnt; i++)
            {
                GButton obj = _children[i].asButton;
                if (obj != null && obj.selected)
                    ret.Add(ChildIndexToItemIndex(i));
            }
            return ret;
        }

Usage Example

示例#1
0
    static int GetSelection(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 1)
            {
                FairyGUI.GList obj = (FairyGUI.GList)ToLua.CheckObject <FairyGUI.GList>(L, 1);
                System.Collections.Generic.List <int> o = obj.GetSelection();
                ToLua.PushSealed(L, o);
                return(1);
            }
            else if (count == 2)
            {
                FairyGUI.GList obj = (FairyGUI.GList)ToLua.CheckObject <FairyGUI.GList>(L, 1);
                System.Collections.Generic.List <int> arg0 = (System.Collections.Generic.List <int>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <int>));
                System.Collections.Generic.List <int> o    = obj.GetSelection(arg0);
                ToLua.PushSealed(L, o);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: FairyGUI.GList.GetSelection"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
All Usage Examples Of FairyGUI.GList::GetSelection