示例#1
0
        private void BuildPage()
        {
            this.RemoveAllChildren();
            int       num1       = true.ToInt() * 100;
            UIElement uiElement1 = new UIElement();

            uiElement1.Width.Set(0.0f, 0.875f);
            uiElement1.MaxWidth.Set(800f + (float)num1, 0.0f);
            uiElement1.MinWidth.Set(600f + (float)num1, 0.0f);
            uiElement1.Top.Set(220f, 0.0f);
            uiElement1.Height.Set(-220f, 1f);
            uiElement1.HAlign = 0.5f;
            this.Append(uiElement1);
            this.MakeExitButton(uiElement1);
            UIPanel uiPanel = new UIPanel();

            uiPanel.Width.Set(0.0f, 1f);
            uiPanel.Height.Set(-90f, 1f);
            uiPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
            uiElement1.Append((UIElement)uiPanel);
            uiPanel.PaddingTop    -= 4f;
            uiPanel.PaddingBottom -= 4f;
            int       num2       = 24;
            UIElement uiElement2 = new UIElement()
            {
                Width  = new StyleDimension(0.0f, 1f),
                Height = new StyleDimension((float)num2, 0.0f),
                VAlign = 0.0f
            };

            uiElement2.SetPadding(0.0f);
            uiPanel.Append(uiElement2);
            UIBestiaryEntryInfoPage bestiaryEntryInfoPage = new UIBestiaryEntryInfoPage();

            bestiaryEntryInfoPage.Height = new StyleDimension(12f, 1f);
            bestiaryEntryInfoPage.HAlign = 1f;
            UIBestiaryEntryInfoPage infoSpace = bestiaryEntryInfoPage;

            this.AddSortAndFilterButtons(uiElement2, infoSpace);
            this.AddSearchBar(uiElement2, infoSpace);
            int       num3     = 20;
            UIElement element1 = new UIElement()
            {
                Width  = new StyleDimension(0.0f, 1f),
                Height = new StyleDimension((float)(-num2 - 6 - num3), 1f),
                VAlign = 1f,
                Top    = new StyleDimension((float)-num3, 0.0f)
            };

            element1.SetPadding(0.0f);
            uiPanel.Append(element1);
            UIElement uiElement3 = new UIElement()
            {
                Width  = new StyleDimension(0.0f, 1f),
                Height = new StyleDimension(20f, 0.0f),
                VAlign = 1f
            };

            uiPanel.Append(uiElement3);
            uiElement3.SetPadding(0.0f);
            this.FillProgressBottomBar(uiElement3);
            UIElement element2 = new UIElement()
            {
                Width  = new StyleDimension(-12f - infoSpace.Width.Pixels, 1f),
                Height = new StyleDimension(-4f, 1f),
                VAlign = 1f
            };

            element1.Append(element2);
            element2.SetPadding(0.0f);
            this._bestiarySpace = element2;
            UIBestiaryEntryGrid bestiaryEntryGrid = new UIBestiaryEntryGrid(this._workingSetEntries, new UIElement.MouseEvent(this.Click_SelectEntryButton));

            element2.Append((UIElement)bestiaryEntryGrid);
            this._entryGrid = bestiaryEntryGrid;
            this._entryGrid.OnGridContentsChanged += new Action(this.UpdateBestiaryGridRange);
            element1.Append((UIElement)infoSpace);
            this._infoSpace = infoSpace;
            this.AddBackAndForwardButtons(uiElement2);
            this._sortingGrid                     = new UIBestiarySortingOptionsGrid(this._sorter);
            this._sortingGrid.OnClick            += new UIElement.MouseEvent(this.Click_CloseSortingGrid);
            this._sortingGrid.OnClickingOption   += new Action(this.UpdateBestiaryContents);
            this._filteringGrid                   = new UIBestiaryFilteringOptionsGrid(this._filterer);
            this._filteringGrid.OnClick          += new UIElement.MouseEvent(this.Click_CloseFilteringGrid);
            this._filteringGrid.OnClickingOption += new Action(this.UpdateBestiaryContents);
            this._filteringGrid.SetupAvailabilityTest(this._originalEntriesList);
            this._searchBar.SetContents((string)null, true);
            this.UpdateBestiaryContents();
        }
示例#2
0
        private void BuildPage()
        {
            RemoveAllChildren();
            int       num       = Utils.ToInt(value: true) * 100;
            UIElement uIElement = new UIElement();

            uIElement.Width.Set(0f, 0.875f);
            uIElement.MaxWidth.Set(800f + (float)num, 0f);
            uIElement.MinWidth.Set(600f + (float)num, 0f);
            uIElement.Top.Set(220f, 0f);
            uIElement.Height.Set(-220f, 1f);
            uIElement.HAlign = 0.5f;
            Append(uIElement);
            MakeExitButton(uIElement);
            UIPanel uIPanel = new UIPanel();

            uIPanel.Width.Set(0f, 1f);
            uIPanel.Height.Set(-90f, 1f);
            uIPanel.BackgroundColor = new Color(33, 43, 79) * 0.8f;
            uIElement.Append(uIPanel);
            uIPanel.PaddingTop    -= 4f;
            uIPanel.PaddingBottom -= 4f;
            int       num2       = 24;
            UIElement uIElement2 = new UIElement
            {
                Width  = new StyleDimension(0f, 1f),
                Height = new StyleDimension(num2, 0f),
                VAlign = 0f
            };

            uIElement2.SetPadding(0f);
            uIPanel.Append(uIElement2);
            UIBestiaryEntryInfoPage uIBestiaryEntryInfoPage = new UIBestiaryEntryInfoPage
            {
                Height = new StyleDimension(12f, 1f),
                HAlign = 1f
            };

            AddSortAndFilterButtons(uIElement2, uIBestiaryEntryInfoPage);
            AddSearchBar(uIElement2, uIBestiaryEntryInfoPage);
            int       num3       = 20;
            UIElement uIElement3 = new UIElement
            {
                Width  = new StyleDimension(0f, 1f),
                Height = new StyleDimension(-num2 - 6 - num3, 1f),
                VAlign = 1f,
                Top    = new StyleDimension(-num3, 0f)
            };

            uIElement3.SetPadding(0f);
            uIPanel.Append(uIElement3);
            UIElement uIElement4 = new UIElement
            {
                Width  = new StyleDimension(0f, 1f),
                Height = new StyleDimension(20f, 0f),
                VAlign = 1f
            };

            uIPanel.Append(uIElement4);
            uIElement4.SetPadding(0f);
            FillProgressBottomBar(uIElement4);
            UIElement uIElement5 = new UIElement
            {
                Width  = new StyleDimension(-12f - uIBestiaryEntryInfoPage.Width.Pixels, 1f),
                Height = new StyleDimension(-4f, 1f),
                VAlign = 1f
            };

            uIElement3.Append(uIElement5);
            uIElement5.SetPadding(0f);
            _bestiarySpace = uIElement5;
            UIBestiaryEntryGrid uIBestiaryEntryGrid = new UIBestiaryEntryGrid(_workingSetEntries, Click_SelectEntryButton);

            uIElement5.Append(uIBestiaryEntryGrid);
            _entryGrid = uIBestiaryEntryGrid;
            _entryGrid.OnGridContentsChanged += UpdateBestiaryGridRange;
            uIElement3.Append(uIBestiaryEntryInfoPage);
            _infoSpace = uIBestiaryEntryInfoPage;
            AddBackAndForwardButtons(uIElement2);
            _sortingGrid                     = new UIBestiarySortingOptionsGrid(_sorter);
            _sortingGrid.OnClick            += Click_CloseSortingGrid;
            _sortingGrid.OnClickingOption   += UpdateBestiaryContents;
            _filteringGrid                   = new UIBestiaryFilteringOptionsGrid(_filterer);
            _filteringGrid.OnClick          += Click_CloseFilteringGrid;
            _filteringGrid.OnClickingOption += UpdateBestiaryContents;
            _filteringGrid.SetupAvailabilityTest(_originalEntriesList);
            _searchBar.SetContents(null, forced: true);
            UpdateBestiaryContents();
        }