Exemple #1
0
        /** プールから作成。
         */
        public void InitializeFromPool(long a_drawpriority, Scroll_Type a_scroll_type, int a_item_length)
        {
            //eventplate
            this.eventplate = new EventPlate.Item(null, EventPlate.EventType.View, a_drawpriority);
            this.eventplate.SetOnEventPlateOver(this, -1);

            //list
            this.list = new System.Collections.Generic.List <ITEM>();

            //drawpriority
            this.param.drawpriority = a_drawpriority;

            //scroll_value
            this.param.scroll_value.Initialize();
            this.param.scroll_value.SetCallBack(this);
            this.param.scroll_value.SetItemLength(a_item_length);

            //scroll_drag
            this.param.scroll_drag.Initialize();
            this.param.scroll_drag.SetCallBack(this);

            //rect
            this.param.rect.Set(0, 0, 0, 0);
            this.param.bg_offset.Set(0, 0);
            this.param.clip_rect.Set(0, 0, 0, 0);

            //scroll_type
            this.param.scroll_type = a_scroll_type;

            //is_onover
            this.param.is_onover = false;

            //visible_flag
            this.param.visible_flag = true;
        }
Exemple #2
0
        /** constructor
         */
        public static Scroll <ITEM> Create(Fee.Deleter.Deleter a_deleter, long a_drawpriority, Scroll_Type a_scroll_type, int a_item_length)
        {
            //Scroll t_this = Fee.Ui.Ui.GetInstance().GetPoolList_Scroll().PoolNew();
            Scroll <ITEM> t_this = new Scroll <ITEM>();

            {
                //プールから作成。
                t_this.InitializeFromPool(a_drawpriority, a_scroll_type, a_item_length);

                //背景。
                t_this.bg = Fee.Render2D.Sprite2D.Create(null, a_drawpriority);
                t_this.bg.SetTexture(UnityEngine.Texture2D.whiteTexture);
                t_this.bg.SetRect(0, 0, 0, 0);
                t_this.bg.SetTextureRect(in Fee.Render2D.Config.TEXTURE_RECT_MAX);
                t_this.bg.SetColor(0.0f, 0.0f, 0.0f, 1.0f);
                t_this.bg.SetMaterialType(Fee.Render2D.MaterialType.Alpha);

                //背景。
                t_this.bg_enable = true;

                //バー。
                t_this.bar_drawpriority_offset = 1;
                t_this.bar_size   = 5;
                t_this.bar_offset = 1;

                //バー。
                t_this.bar = Fee.Render2D.Sprite2D.Create(null, a_drawpriority + t_this.bar_drawpriority_offset);
                t_this.bar.SetTexture(UnityEngine.Texture2D.whiteTexture);
                t_this.bar.SetRect(0, 0, 0, 0);
                t_this.bar.SetTextureRect(in Fee.Render2D.Config.TEXTURE_RECT_MAX);
                t_this.bar.SetColor(1.0f, 1.0f, 1.0f, 1.0f);
                t_this.bar.SetMaterialType(Fee.Render2D.MaterialType.Alpha);
                t_this.bar.SetVisible(false);

                //バー。
                t_this.bar_enable = true;

                if (a_deleter != null)
                {
                    a_deleter.Regist(t_this);
                }
            }
            return(t_this);
        }