protected override void Init()
    {
        base.Init();

        m_killScrollView = transform.GetComponent <ScrollViewEx>("scrollView_left");
        m_rankScrollView = transform.GetComponent <ScrollViewEx>("scrollView_right");
    }
 private void UpdateVerticalScroll(ScrollViewEx scrollView)
 {
     if (ChildCount > 0)
     {
         GetChildAt(0).VerticalScrollBarEnabled = scrollView.ShowVerticalScrollIndicator;
     }
 }
 private void UpdateHorizontalScroll(ScrollViewEx scrollView)
 {
     if (ChildCount > 0)
     {
         GetChildAt(0).HorizontalScrollBarEnabled = scrollView.ShowHorizontalScrollIndicator;
     }
 }
Exemple #4
0
        static int _g_get_colNum(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                LuaAPI.xlua_pushinteger(L, __cl_gen_to_be_invoked.colNum);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemple #5
0
        static int _g_get_spacing(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                translator.PushUnityEngineVector2(L, __cl_gen_to_be_invoked.spacing);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemple #6
0
        static int _g_get_LoopItemRefreshData(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                translator.Push(L, __cl_gen_to_be_invoked.LoopItemRefreshData);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(1);
        }
Exemple #7
0
        static int _s_set_poolSize(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.poolSize = LuaAPI.xlua_tointeger(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Exemple #8
0
        static int _s_set_LoopItemRefreshData(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                __cl_gen_to_be_invoked.LoopItemRefreshData = translator.GetDelegate <System.Func <UnityEngine.GameObject, int, bool> >(L, 2);
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Exemple #9
0
        static int _s_set_spacing(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                ScrollViewEx        __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);
                UnityEngine.Vector2 __cl_gen_value; translator.Get(L, 2, out __cl_gen_value);
                __cl_gen_to_be_invoked.spacing = __cl_gen_value;
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(0);
        }
Exemple #10
0
        static int _m_EnabledScroll(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            int __gen_param_count = LuaAPI.lua_gettop(L);

            try {
                if (__gen_param_count == 3 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 3))
                {
                    bool bForce  = LuaAPI.lua_toboolean(L, 2);
                    bool bScroll = LuaAPI.lua_toboolean(L, 3);

                    __cl_gen_to_be_invoked.EnabledScroll(bForce, bScroll);



                    return(0);
                }
                if (__gen_param_count == 2 && LuaTypes.LUA_TBOOLEAN == LuaAPI.lua_type(L, 2))
                {
                    bool bForce = LuaAPI.lua_toboolean(L, 2);

                    __cl_gen_to_be_invoked.EnabledScroll(bForce);



                    return(0);
                }
                if (__gen_param_count == 1)
                {
                    __cl_gen_to_be_invoked.EnabledScroll(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }

            return(LuaAPI.luaL_error(L, "invalid arguments to ScrollViewEx.EnabledScroll!"));
        }
Exemple #11
0
        static int __CreateInstance(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);

            try {
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    ScrollViewEx __cl_gen_ret = new ScrollViewEx();
                    translator.Push(L, __cl_gen_ret);
                    return(1);
                }
            }
            catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to ScrollViewEx constructor!"));
        }
Exemple #12
0
        static int _m_PreviewInit(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            try {
                {
                    __cl_gen_to_be_invoked.PreviewInit(  );



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #13
0
        //--------------------------------------------------------
        //  虚函数
        //--------------------------------------------------------
        protected override void InitUI()
        {
            base.InitUI();

            mSelectedServerInfo      = null;
            mMaintainingServerTimers = new List <Utils.DecimalTimer>();
            mMaintainingServerTimers.Clear();

            // 选服界面
            mCloseServerListPanelButton = FindChild <Button>("CloseServerListPanelButton");
            mCloseServerListPanelButton.onClick.AddListener(OnClickCloseServerListPanelButton);

            // 大区列表界面
            mRegionListContent = FindChild <Transform>("RegionListContent").gameObject;
            mRegionItem        = FindChild <Transform>("RegionItem").gameObject;
            mRegionItem.SetActive(false);
            mRegionListScrollViewEx = FindChild <ScrollViewEx>("RegionListScrollView");
            mRegionListScrollViewEx.LoopItemRefreshData = UpdateRegionItem;

            // 已有角色界面
            mHaveRoleServerListPanel   = FindChild <Transform>("HaveRoleServerListPanel").gameObject;
            mHaveRoleServerListContent = FindChild <Transform>("HaveRoleServerListContent").gameObject;
            mHaveRoleServerItem        = FindChild <Transform>("HaveRoleServerItem").gameObject;
            mHaveRoleServerItem.SetActive(false);
            mRoleHeadSpriteList = FindChild <Transform>("RoleHeadPanel").GetComponent <SpriteList>();

            // 推荐界面
            mRecommendServerListPanel   = FindChild <Transform>("RecommendServerListPanel").gameObject;
            mRecommendServerListContent = FindChild <Transform>("RecommendServerListContent").gameObject;
            mRecommendServerItem        = FindChild <Transform>("RecommendServerItem").gameObject;
            mRecommendServerItem.SetActive(false);
            mWillOpenServerListContent = FindChild <Transform>("WillOpenServerListContent").gameObject;
            mWillOpenServerItem        = FindChild <Transform>("WillOpenServerItem").gameObject;
            mWillOpenServerItem.SetActive(false);

            // 普通服务器列表界面
            mNormalServerListPanel   = FindChild <Transform>("NormalServerListPanel").gameObject;
            mNormalServerListContent = FindChild <Transform>("NormalServerListContent").gameObject;
            mNormalServerItem        = FindChild <Transform>("NormalServerItem").gameObject;
            mNormalServerItem.SetActive(false);
        }
Exemple #14
0
        static int _m_GetVisualEndIdx(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            try {
                {
                    int __cl_gen_ret = __cl_gen_to_be_invoked.GetVisualEndIdx(  );
                    LuaAPI.xlua_pushinteger(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #15
0
        static int _m_ScrollToItem(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            try {
                {
                    int idx = LuaAPI.xlua_tointeger(L, 2);

                    __cl_gen_to_be_invoked.ScrollToItem(idx);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #16
0
        static int _m_SetCustomMove(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            try {
                {
                    bool enable = LuaAPI.lua_toboolean(L, 2);

                    __cl_gen_to_be_invoked.SetCustomMove(enable);



                    return(0);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #17
0
        static int _m_GetCellByIdx(RealStatePtr L)
        {
            ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);


            ScrollViewEx __cl_gen_to_be_invoked = (ScrollViewEx)translator.FastGetCSObj(L, 1);


            try {
                {
                    int idx = LuaAPI.xlua_tointeger(L, 2);

                    UnityEngine.GameObject __cl_gen_ret = __cl_gen_to_be_invoked.GetCellByIdx(idx);
                    translator.Push(L, __cl_gen_ret);



                    return(1);
                }
            } catch (System.Exception __gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e));
            }
        }
Exemple #18
0
 private void ScrollViewH_Scrolled(ScrollViewEx sender, Rectangle rect)
 {
     System.Diagnostics.Debug.WriteLine("" + rect.X + "," + rect.Y);
 }
 protected override void Init()
 {
     base.Init();
     m_scrollView = transform.GetComponent <ScrollViewEx>();
 }
Exemple #20
0
    static void CreateHorizontal(MenuCommand menuCommand)
    {
        GameObject go     = new GameObject("Scroll View Ex");
        GameObject select = menuCommand.context as GameObject;

        if (select == null)
        {
            select = Selection.activeTransform.gameObject;
        }
        GameObjectUtility.SetParentAndAlign(go, select);
        go.transform.localRotation = Quaternion.identity;
        go.transform.localScale    = Vector3.one;
        Undo.RegisterCreatedObjectUndo(go, "Create " + go.name);
        Selection.activeObject = go;
        RectTransform rectTrans = go.AddComponent <RectTransform>();

        rectTrans.sizeDelta = new Vector3(300, 200);
        ScrollRect   rect = go.AddComponent <ScrollRect>();
        ScrollViewEx ex   = go.AddComponent <ScrollViewEx>();

        go.AddComponent <Mask>().showMaskGraphic = false;
        go.AddComponent <Image>();
        rect.horizontal = true;
        rect.vertical   = false;
        rect.viewport   = rectTrans;
        ex.direction    = Direction.Horizontal;
        ex.spacing      = new Vector2(10, 10);
        ex.unit         = 1;
        RectTransform root = (new GameObject("Root")).AddComponent <RectTransform>();

        GameObjectUtility.SetParentAndAlign(root.gameObject, go);
        root.localRotation    = Quaternion.identity;
        root.localScale       = Vector3.one;
        root.anchorMin        = new Vector2(0.5f, 0.5f);
        root.anchorMax        = new Vector2(0.5f, 0.5f);
        root.pivot            = new Vector2(0.5f, 0.5f);
        root.anchoredPosition = new Vector2(0, 0);
        root.sizeDelta        = new Vector2(300, 200);
        GameObject cell = new GameObject("Cell");

        GameObjectUtility.SetParentAndAlign(cell, root.gameObject);
        cell.transform.localPosition = new Vector3(-100, 0, 0);
        cell.transform.localRotation = Quaternion.identity;
        cell.transform.localScale    = Vector3.one;
        RectTransform rectCell = cell.AddComponent <RectTransform>();

        rectCell.sizeDelta = new Vector2(0, 0);
        GameObject temp1 = new GameObject("(Delete Me)");

        GameObjectUtility.SetParentAndAlign(temp1, cell);
        Text text = temp1.AddComponent <Text>();

        text.text     = "<b>Insert\nYour\nCell\nHere</b>";
        text.fontSize = 23;
        Outline outline = temp1.AddComponent <Outline>();

        outline.effectColor = new Color(0, 0, 0, 1);
        GameObject temp2 = new GameObject("Image");

        GameObjectUtility.SetParentAndAlign(temp2, temp1);
        Image image = temp2.AddComponent <Image>();

        image.color  = new Color(1, 1, 1, 0.5f);
        rect.content = root;
    }
Exemple #21
0
 private void UpdateHorizontalScroll(ScrollViewEx scrollView)
 {
     ShowsHorizontalScrollIndicator = scrollView.ShowHorizontalScrollIndicator;
 }
Exemple #22
0
 private void UpdateVerticalScroll(ScrollViewEx scrollView)
 {
     ShowsVerticalScrollIndicator = scrollView.ShowVerticalScrollIndicator;
 }
Exemple #23
0
 private void UpdateBounce(ScrollViewEx scrollViewEx)
 {
     Bounces = scrollViewEx.BounceEnabled;
 }