示例#1
0
        protected override JSONObject ToJSON(WXHierarchyContext context)
        {
            JSONObject json = new JSONObject(JSONObject.Type.OBJECT);
            JSONObject data = new JSONObject(JSONObject.Type.OBJECT);

            json.AddField("type", getTypeName());
            json.AddField("data", data);
            data.AddField("active", true);

            UIScrollView.ShowCondition showScrollBars = uiScrollView.showScrollBars;
            data.AddField("showScrollBars", (int)showScrollBars);

            var horizontalScrollBar = (UIScrollBar)uiScrollView.horizontalScrollBar;

            if (horizontalScrollBar != null)
            {
                data.AddField("horizontalScrollBar", context.AddComponent(new WXUIScrollBarScript(horizontalScrollBar, go, entity), horizontalScrollBar));
            }

            var verticalScrollBar = (UIScrollBar)uiScrollView.verticalScrollBar;

            if (verticalScrollBar != null)
            {
                data.AddField("verticalScrollBar", context.AddComponent(new WXUIScrollBarScript(verticalScrollBar, go, entity), verticalScrollBar));
            }


            data.AddField("ref", context.AddComponent(new WXUIScrollView(uiScrollView, go, entity), uiScrollView));

            return(json);
        }
示例#2
0
    static int get_showScrollBars(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIScrollView obj = (UIScrollView)o;
            UIScrollView.ShowCondition ret = obj.showScrollBars;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index showScrollBars on a nil value"));
        }
    }
示例#3
0
    static int set_showScrollBars(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            UIScrollView obj = (UIScrollView)o;
            UIScrollView.ShowCondition arg0 = (UIScrollView.ShowCondition)ToLua.CheckObject(L, 2, typeof(UIScrollView.ShowCondition));
            obj.showScrollBars = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index showScrollBars on a nil value"));
        }
    }
示例#4
0
    private static int get_showScrollBars(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            UIScrollView uIScrollView = (UIScrollView)obj;
            UIScrollView.ShowCondition showScrollBars = uIScrollView.showScrollBars;
            ToLua.Push(L, showScrollBars);
            result = 1;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index showScrollBars on a nil value");
        }
        return(result);
    }
示例#5
0
    private static int set_showScrollBars(IntPtr L)
    {
        object obj = null;
        int    result;

        try
        {
            obj = ToLua.ToObject(L, 1);
            UIScrollView uIScrollView = (UIScrollView)obj;
            UIScrollView.ShowCondition showScrollBars = (UIScrollView.ShowCondition)((int)ToLua.CheckObject(L, 2, typeof(UIScrollView.ShowCondition)));
            uIScrollView.showScrollBars = showScrollBars;
            result = 0;
        }
        catch (Exception ex)
        {
            result = LuaDLL.toluaL_exception(L, ex, (obj != null) ? ex.Message : "attempt to index showScrollBars on a nil value");
        }
        return(result);
    }