コード例 #1
0
        private void BuildInfinitesMenuContents(UIElement totalContainer)
        {
            UIPanel basicPanel = UICreativeInfiniteItemsDisplay.CreateBasicPanel();

            totalContainer.Append((UIElement)basicPanel);
            basicPanel.OnUpdate    += new UIElement.ElementEvent(this.Hover_OnUpdate);
            basicPanel.OnMouseOver += new UIElement.MouseEvent(this.Hover_OnMouseOver);
            basicPanel.OnMouseOut  += new UIElement.MouseEvent(this.Hover_OnMouseOut);
            UIDynamicItemCollection dynamicItemCollection = new UIDynamicItemCollection();

            this._itemGrid = dynamicItemCollection;
            UIElement uiElement = new UIElement()
            {
                Height = new StyleDimension(24f, 0.0f),
                Width  = new StyleDimension(0.0f, 1f)
            };

            uiElement.SetPadding(0.0f);
            basicPanel.Append(uiElement);
            this.AddSearchBar(uiElement);
            this._searchBar.SetContents((string)null, true);
            UIList uiList1 = new UIList();

            uiList1.Width  = new StyleDimension(-25f, 1f);
            uiList1.Height = new StyleDimension(-28f, 1f);
            uiList1.VAlign = 1f;
            uiList1.HAlign = 0.0f;
            UIList uiList2 = uiList1;

            basicPanel.Append((UIElement)uiList2);
            float       num         = 4f;
            UIScrollbar uiScrollbar = new UIScrollbar();

            uiScrollbar.Height = new StyleDimension((float)(-28.0 - (double)num * 2.0), 1f);
            uiScrollbar.Top    = new StyleDimension(-num, 0.0f);
            uiScrollbar.VAlign = 1f;
            uiScrollbar.HAlign = 1f;
            UIScrollbar scrollbar = uiScrollbar;

            basicPanel.Append((UIElement)scrollbar);
            uiList2.SetScrollbar(scrollbar);
            uiList2.Add((UIElement)dynamicItemCollection);
            UICreativeItemsInfiniteFilteringOptions filteringOptions = new UICreativeItemsInfiniteFilteringOptions(this._filterer, "CreativeInfinitesFilter");

            filteringOptions.OnClickingOption += new Action(this.filtersHelper_OnClickingOption);
            filteringOptions.Left              = new StyleDimension(20f, 0.0f);
            totalContainer.Append((UIElement)filteringOptions);
            filteringOptions.OnUpdate    += new UIElement.ElementEvent(this.Hover_OnUpdate);
            filteringOptions.OnMouseOver += new UIElement.MouseEvent(this.Hover_OnMouseOver);
            filteringOptions.OnMouseOut  += new UIElement.MouseEvent(this.Hover_OnMouseOut);
        }
コード例 #2
0
        private void BuildInfinitesMenuContents(UIElement totalContainer)
        {
            UIPanel uIPanel = CreateBasicPanel();

            totalContainer.Append(uIPanel);
            uIPanel.OnUpdate    += Hover_OnUpdate;
            uIPanel.OnMouseOver += Hover_OnMouseOver;
            uIPanel.OnMouseOut  += Hover_OnMouseOut;
            UIDynamicItemCollection item = _itemGrid = new UIDynamicItemCollection();
            UIElement uIElement          = new UIElement
            {
                Height = new StyleDimension(24f, 0f),
                Width  = new StyleDimension(0f, 1f)
            };

            uIElement.SetPadding(0f);
            uIPanel.Append(uIElement);
            AddSearchBar(uIElement);
            _searchBar.SetContents(null, forced: true);
            UIList uIList = new UIList
            {
                Width  = new StyleDimension(-25f, 1f),
                Height = new StyleDimension(-28f, 1f),
                VAlign = 1f,
                HAlign = 0f
            };

            uIPanel.Append(uIList);
            float       num         = 4f;
            UIScrollbar uIScrollbar = new UIScrollbar
            {
                Height = new StyleDimension(-28f - num * 2f, 1f),
                Top    = new StyleDimension(0f - num, 0f),
                VAlign = 1f,
                HAlign = 1f
            };

            uIPanel.Append(uIScrollbar);
            uIList.SetScrollbar(uIScrollbar);
            uIList.Add(item);
            UICreativeItemsInfiniteFilteringOptions uICreativeItemsInfiniteFilteringOptions = new UICreativeItemsInfiniteFilteringOptions(_filterer, "CreativeInfinitesFilter");

            uICreativeItemsInfiniteFilteringOptions.OnClickingOption += filtersHelper_OnClickingOption;
            uICreativeItemsInfiniteFilteringOptions.Left              = new StyleDimension(20f, 0f);
            totalContainer.Append(uICreativeItemsInfiniteFilteringOptions);
            uICreativeItemsInfiniteFilteringOptions.OnUpdate    += Hover_OnUpdate;
            uICreativeItemsInfiniteFilteringOptions.OnMouseOver += Hover_OnMouseOver;
            uICreativeItemsInfiniteFilteringOptions.OnMouseOut  += Hover_OnMouseOut;
        }