Example #1
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            var friendListPanel = new UIAdvPanel(Drawing.Box1);

            friendListPanel.Top.Set(95, 0f);
            friendListPanel.Left.Set(10f, 0f);
            friendListPanel.Width.Set(FRIENDLIST_WIDTH, 0f);
            friendListPanel.Height.Set(FRIENDLIST_HEIGHT, 0f);
            friendListPanel.SetPadding(10f);

            _friendList = new UIAdvList();
            _friendList.Width.Set(-25f, 1f);
            _friendList.Height.Set(0f, 1f);
            _friendList.ListPadding = 5f;
            friendListPanel.Append(_friendList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            friendListPanel.Append(uiscrollbar);
            _friendList.SetScrollbar(uiscrollbar);
            WindowPanel.Append(friendListPanel);
        }
        private void AddItemSlots()
        {
            var itemSlotPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true,
                Color          = Color.Gray * 0.5f
            };

            itemSlotPanel.VAlign = 1f;
            itemSlotPanel.Width.Set(0, 1f);
            itemSlotPanel.Height.Set(ITEMSLOT_HEIGHT, 0f);
            itemSlotPanel.SetPadding(10f);
            itemSlotPanel.Visible = false;
            outerContentPanel.Append(itemSlotPanel);

            _uiItemGrid = new UIAdvGrid();
            _uiItemGrid.Width.Set(-25f, 1f);
            _uiItemGrid.Height.Set(0f, 1f);
            _uiItemGrid.ListPadding = 10f;
            itemSlotPanel.Append(_uiItemGrid);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            itemSlotPanel.Append(uiscrollbar);
            _uiItemGrid.SetScrollbar(uiscrollbar);
        }
Example #3
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            _itemPanel = new UIPanel {
                BackgroundColor = Color.DarkBlue * 0.75f
            };
            _itemPanel.Top.Set(ITEM_BROWSER_OFFSETY, 0f);
            _itemPanel.Left.Set(ITEM_BROWSER_OFFSETX, 0f);
            _itemPanel.Width.Set(-2 * ITEM_BROWSER_OFFSETX, 1f);
            _itemPanel.Height.Set(-20 - ITEM_BROWSER_OFFSETY, 1f);

            _npcGrid = new UIAdvGrid();
            _npcGrid.Width.Set(-25f, 1f);
            _npcGrid.Height.Set(0f, 1f);
            _npcGrid.ListPadding = 5f;
            _itemPanel.Append(_npcGrid);


            uISlots = new List <UISimpleSlot>();
            for (var i = 1; i < Main.npcTexture.Length; i++)
            {
                var simpleslot = new UISimpleSlot(i);

                simpleslot.Width.Set(40f, 0f);
                simpleslot.Height.Set(40f, 0f);
                uISlots.Add(simpleslot);
            }
            _npcGrid.AddRange(uISlots);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            _itemPanel.Append(uiscrollbar);
            _npcGrid.SetScrollbar(uiscrollbar);

            WindowPanel.Append(_itemPanel);

            _searchTextBox = new UIAdvTextBox();
            _searchTextBox.Left.Set(-ITEM_BROWSER_OFFSETX - SEARCH_BAR_WIDTH, 1f);
            _searchTextBox.Top.Set(50, 0f);
            _searchTextBox.Width.Set(SEARCH_BAR_WIDTH, 0f);
            _searchTextBox.Height.Set(SEARCH_BAR_HEIGHT, 0f);
            _searchTextBox.OnTextChange += _searchTextBox_OnTextChange;
            WindowPanel.Append(_searchTextBox);
        }
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            var matchlistPanel = new UIAdvPanel(Drawing.Box1);

            matchlistPanel.Top.Set(-MATCH_LIST_HEIGHT / 2 + MATCHLIST_OFFSET_TOP, 0.5f);
            matchlistPanel.Left.Set(-MATCH_LIST_WIDTH / 2 + MATCHLIST_OFFSET_RIGHT, 0.5f);
            matchlistPanel.Width.Set(MATCH_LIST_WIDTH, 0f);
            matchlistPanel.Height.Set(MATCH_LIST_HEIGHT, 0f);
            matchlistPanel.SetPadding(10f);

            _matchedGameList = new UIAdvList();
            _matchedGameList.Width.Set(-25f, 1f);
            _matchedGameList.Height.Set(0f, 1f);
            _matchedGameList.ListPadding = 5f;
            matchlistPanel.Append(_matchedGameList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            matchlistPanel.Append(uiscrollbar);
            _matchedGameList.SetScrollbar(uiscrollbar);
            WindowPanel.Append(matchlistPanel);

            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(55, 0f);
            refreshButton.Left.Set(-35 / 2 - 65, 1f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.OnClick           += RefreshButton_OnClick;
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            WindowPanel.Append(refreshButton);

            onlinelabel = new UIText("游戏大厅");
            onlinelabel.Top.Set(-MATCH_LIST_HEIGHT / 2 + MATCHLIST_OFFSET_TOP - 25f, 0.5f);
            var texSize = Main.fontMouseText.MeasureString(onlinelabel.Text);

            onlinelabel.Left.Set(-MATCH_LIST_WIDTH / 2 + MATCHLIST_OFFSET_RIGHT, 0.5f);
            WindowPanel.Append(onlinelabel);
        }
Example #5
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            _itemPanel = new UIPanel();
            _itemPanel.BackgroundColor = Color.DarkBlue * 0.75f;
            _itemPanel.Top.Set(ITEM_BROWSER_OFFSETY, 0f);
            _itemPanel.Left.Set(ITEM_BROWSER_OFFSETX, 0f);
            _itemPanel.Width.Set(INVENTORY_WIDTH, 0f);
            _itemPanel.Height.Set(INVENTORY_HEIGHT, 0f);


            //UISwitch uISwitch = new UISwitch();
            //uISwitch.Top.Set(50, 0);
            //uISwitch.Left.Set(50, 0);
            //uISwitch.Width.Set(60, 0f);
            //uISwitch.Height.Set(30, 0f);
            //WindowPanel.Append(uISwitch);

            _itemGrid = new UIAdvGrid();
            _itemGrid.Width.Set(-25f, 1f);
            _itemGrid.Height.Set(0f, 1f);
            _itemGrid.ListPadding = 5f;
            _itemPanel.Append(_itemGrid);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            _itemPanel.Append(uiscrollbar);
            _itemGrid.SetScrollbar(uiscrollbar);

            WindowPanel.Append(_itemPanel);


            _playerName        = new UIText("玩家的背包", 0.7f, true);
            _playerName.HAlign = 0.5f;
            _playerName.Top.Set(30, 0f);

            WindowPanel.Append(_playerName);
        }
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            candidatesPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            candidatesPanel.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            candidatesPanel.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT, 0.5f);
            candidatesPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            candidatesPanel.Height.Set(UNIONLIST_HEIGHT, 0f);
            candidatesPanel.SetPadding(10f);

            WindowPanel.Append(candidatesPanel);

            _candidateList = new UIAdvList();
            _candidateList.Width.Set(-25f, 1f);
            _candidateList.Height.Set(0f, 1f);
            _candidateList.ListPadding    = 5f;
            _candidateList.OverflowHidden = true;
            candidatesPanel.Append(_candidateList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            candidatesPanel.Append(uiscrollbar);
            _candidateList.SetScrollbar(uiscrollbar);


            var label = new UIText("公会申请信息", 0.7f, true);

            label.Top.Set(50, 0f);
            label.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT + 5, 0.5f);
            WindowPanel.Append(label);
        }
Example #7
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.OverflowHidden = true;
            WindowPanel.MainTexture    = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - windowWidth / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - windowHeight / 2, 0f);
            WindowPanel.Width.Set(windowWidth, 0f);
            WindowPanel.Height.Set(windowHeight, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            unionsPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            unionsPanel.Top.Set(UNIONLIST_OFFSET_TOP, 0f);
            unionsPanel.Left.Set(UNIONLIST_OFFSET_RIGHT, 0f);
            unionsPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            unionsPanel.Height.Set(UNIONLIST_HEIGHT, 0f);
            unionsPanel.SetPadding(10f);

            WindowPanel.Append(unionsPanel);


            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(UNIONLIST_OFFSET_TOP - 50, 0f);
            refreshButton.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH - 35, 0f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            refreshButton.OnClick           += RefreshButton_OnClick;
            WindowPanel.Append(refreshButton);

            var returnButton = new UICDButton(null, true);

            returnButton.Top.Set(UNIONLIST_OFFSET_TOP - 50, 0f);
            returnButton.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH + 20, 0f);
            returnButton.Width.Set(105f, 0f);
            returnButton.Height.Set(50f, 0f);
            returnButton.BoxTexture         = ServerSideCharacter2.ModTexturesTable["AdvInvBack2"];
            returnButton.ButtonDefaultColor = new Color(200, 200, 200);
            returnButton.ButtonChangeColor  = Color.White;
            returnButton.CornerSize         = new Vector2(12, 12);
            returnButton.ButtonText         = "返回大厅";
            returnButton.OnClick           += ReturnButton_OnClick;
            WindowPanel.Append(returnButton);

            _memberList = new UIAdvList();
            _memberList.Width.Set(-25f, 1f);
            _memberList.Height.Set(0f, 1f);
            _memberList.ListPadding    = 5f;
            _memberList.OverflowHidden = true;
            unionsPanel.Append(_memberList);



            var buttonPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };

            buttonPanel.Top.Set(UNIONLIST_OFFSET_TOP, 0f);
            buttonPanel.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH + 10, 0f);
            buttonPanel.Width.Set(150, 0f);
            buttonPanel.Height.Set(240, 0f);
            buttonPanel.SetPadding(10f);
            buttonPanel.Visible = false;
            WindowPanel.Append(buttonPanel);

            _buttonList = new UIAdvList();
            _buttonList.Width.Set(-25f, 1f);
            _buttonList.Height.Set(0f, 1f);
            _buttonList.ListPadding = 5f;
            buttonPanel.Append(_buttonList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            unionsPanel.Append(uiscrollbar);
            _memberList.SetScrollbar(uiscrollbar);


            unionNameText = new UIText("", 0.7f, true);
            unionNameText.Top.Set(UNIONLIST_OFFSET_TOP - 100, 0f);
            unionNameText.Left.Set(UNIONLIST_OFFSET_RIGHT + 5, 0f);
            WindowPanel.Append(unionNameText);

            //expBar = new UIBar
            //{
            //	BarFrameTex = ServerSideCharacter2.ModTexturesTable["ExpBarFrame"],
            //	BarFillTex = Main.magicPixel,
            //	FillerColor = Color.Yellow,
            //	BackGroundColor = Color.Transparent,
            //	BarFrameTexCornerSize = new Vector2(6, 6),
            //	FillerDrawOffset = new Vector2(6, 6),
            //	FillerSize = new Vector2(BAR_WIDTH - 12, BAR_HEIGHT - 12)
            //};
            //expBar.Top.Set(80f, 0f);
            //expBar.Left.Set(40, 0f);
            //expBar.Width.Set(BAR_WIDTH, 0f);
            //expBar.Height.Set(BAR_HEIGHT, 0f);
            //expBar.Value = 0.3f;
            //WindowPanel.Append(expBar);

            unionLevelText = new UIText("");
            unionLevelText.Top.Set(60f, 0f);
            unionLevelText.Left.Set(40, 0f);
            unionLevelText.SetText($"等级: {8} EXP: {10000000} / {30000000}");
            WindowPanel.Append(unionLevelText);

            unionWealthText = new UIText("");
            unionWealthText.Top.Set(90f, 0f);
            unionWealthText.Left.Set(40, 0f);
            unionWealthText.SetText($"财富值: 1000000");
            WindowPanel.Append(unionWealthText);

            //uiSlot = new UISlot(ServerSideCharacter2.ModTexturesTable["AdvInvBack1"]);
            //uiSlot.Left.Set(475, 0f);
            //uiSlot.Top.Set(340, 0f);
            //uiSlot.Width.Set(60, 0f);
            //uiSlot.Height.Set(60, 0f);
            //uiSlot.CanPutInSlot = new CheckPutSlotCondition((item) =>
            //{
            //	return item.type == UnionManager.CurrencyType;
            //});
            //uiSlot.Tooltip = "在这放置咕币来捐献";
            //uiSlot.DrawColor = Color.White;
            //WindowPanel.Append(uiSlot);
        }
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            outerContentPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize = new Vector2(8, 8),
                Color      = new Color(33, 43, 79) * 0.8f
            };
            outerContentPanel.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            outerContentPanel.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT, 0.5f);
            outerContentPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            outerContentPanel.Height.Set(UNIONLIST_HEIGHT + ITEMSLOT_HEIGHT, 0f);
            outerContentPanel.SetPadding(10f);
            WindowPanel.Append(outerContentPanel);


            mailContentPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true,
                Color          = new Color(33, 43, 79) * 0.8f
            };
            mailContentPanel.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            mailContentPanel.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT, 0.5f);
            mailContentPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            mailContentPanel.Height.Set(UNIONLIST_HEIGHT, 0f);
            mailContentPanel.SetPadding(10f);
            mailContentPanel.Visible = false;

            WindowPanel.Append(mailContentPanel);

            _mailContent = new UIMessageBox(GameLanguage.GetText("rankannouncement"));
            _mailContent.Width.Set(-25f, 1f);
            _mailContent.Height.Set(0f, 1f);
            mailContentPanel.Append(_mailContent);

            UIAdvScrollBar uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(-20f, 1f);
            uiscrollbar.VAlign = 0.5f;
            uiscrollbar.HAlign = 1f;
            mailContentPanel.Append(uiscrollbar);
            _mailContent.SetScrollbar(uiscrollbar);

            AddItemSlots();

            // 上方标题
            _uiTitle = new UIText("标题", 0.6f, true);
            _uiTitle.Top.Set(-70f, 0f);
            _uiTitle.SetPadding(15f);
            outerContentPanel.Append(_uiTitle);



            mailHeadPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true,
                Color          = new Color(33, 43, 79) * 0.8f
            };
            mailHeadPanel.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            mailHeadPanel.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT - 260, 0.5f);
            mailHeadPanel.Width.Set(240, 0f);
            mailHeadPanel.Height.Set(UNIONLIST_HEIGHT + ITEMSLOT_HEIGHT, 0f);
            mailHeadPanel.SetPadding(10f);
            WindowPanel.Append(mailHeadPanel);

            _mailList = new UIAdvList();
            _mailList.Width.Set(-25f, 1f);
            _mailList.Height.Set(0f, 1f);
            _mailList.ListPadding = 5f;
            mailHeadPanel.Append(_mailList);

            // ScrollBar设定
            var uiscrollbar2 = new UIAdvScrollBar();

            uiscrollbar2.SetView(100f, 1000f);
            uiscrollbar2.Height.Set(0f, 1f);
            uiscrollbar2.HAlign = 1f;
            mailHeadPanel.Append(uiscrollbar2);
            _mailList.SetScrollbar(uiscrollbar2);


            refreshButton = new UICDButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP - 50, 0.5f);
            refreshButton.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH / 2 - 35, 0.5f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            refreshButton.OnClick           += RefreshButton_OnClick;
            WindowPanel.Append(refreshButton);
        }
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            unionsPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            unionsPanel.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            unionsPanel.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT, 0.5f);
            unionsPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            unionsPanel.Height.Set(UNIONLIST_HEIGHT, 0f);
            unionsPanel.SetPadding(10f);

            WindowPanel.Append(unionsPanel);

            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP - 50, 0.5f);
            refreshButton.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH / 2 - 35, 0.5f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            refreshButton.OnClick           += RefreshButton_OnClick;
            WindowPanel.Append(refreshButton);

            _unionsList = new UIAdvList();
            _unionsList.Width.Set(-25f, 1f);
            _unionsList.Height.Set(0f, 1f);
            _unionsList.ListPadding    = 5f;
            _unionsList.OverflowHidden = true;
            unionsPanel.Append(_unionsList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            unionsPanel.Append(uiscrollbar);
            _unionsList.SetScrollbar(uiscrollbar);

            var label = new UIText("公会列表", 0.7f, true);

            label.Top.Set(40, 0f);
            label.Left.Set(-UNIONLIST_WIDTH / 2 + UNIONLIST_OFFSET_RIGHT + 5, 0.5f);
            WindowPanel.Append(label);

            createUnionButton = new UICDButton(null, true);
            createUnionButton.Top.Set(-UNIONLIST_HEIGHT / 2 + UNIONLIST_OFFSET_TOP, 0.5f);
            createUnionButton.Left.Set(-120, 1f);
            createUnionButton.Width.Set(100, 0f);
            createUnionButton.Height.Set(35, 0f);
            createUnionButton.BoxTexture         = ServerSideCharacter2.ModTexturesTable["AdvInvBack2"];
            createUnionButton.ButtonDefaultColor = new Color(200, 200, 200);
            createUnionButton.ButtonChangeColor  = Color.White;
            createUnionButton.CornerSize         = new Vector2(12, 12);
            createUnionButton.ButtonText         = "创建";
            createUnionButton.OnClick           += CreateUnionButton_OnClick;
            WindowPanel.Append(createUnionButton);
        }
Example #10
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.OverflowHidden = true;
            WindowPanel.MainTexture    = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - windowWidth / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - windowHeight / 2, 0f);
            WindowPanel.Width.Set(windowWidth, 0f);
            WindowPanel.Height.Set(windowHeight, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            unionsPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            unionsPanel.Top.Set(UNIONLIST_OFFSET_TOP, 0f);
            unionsPanel.Left.Set(UNIONLIST_OFFSET_RIGHT, 0f);
            unionsPanel.Width.Set(UNIONLIST_WIDTH, 0f);
            unionsPanel.Height.Set(UNIONLIST_HEIGHT, 0f);
            unionsPanel.SetPadding(10f);

            WindowPanel.Append(unionsPanel);


            _shopItemGrid = new UIAdvGrid();
            _shopItemGrid.Width.Set(-25f, 1f);
            _shopItemGrid.Height.Set(0f, 1f);
            _shopItemGrid.ListPadding    = 7f;
            _shopItemGrid.OverflowHidden = true;
            unionsPanel.Append(_shopItemGrid);


            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            unionsPanel.Append(uiscrollbar);
            _shopItemGrid.SetScrollbar(uiscrollbar);

            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(UNIONLIST_OFFSET_TOP - 50, 0f);
            refreshButton.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH - 35, 0f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            refreshButton.OnClick           += RefreshButton_OnClick;
            WindowPanel.Append(refreshButton);

            var currencyPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };

            currencyPanel.Top.Set(UNIONLIST_OFFSET_TOP, 0f);
            currencyPanel.Left.Set(UNIONLIST_OFFSET_RIGHT + UNIONLIST_WIDTH + 15, 0f);
            currencyPanel.Width.Set(165, 0f);
            currencyPanel.Height.Set(80, 0f);
            currencyPanel.SetPadding(5f);
            var currencylabel = new UIText("当前货币");

            currencylabel.Top.Set(5, 0f);
            currencylabel.HAlign = 0.5f;
            currencyPanel.Append(currencylabel);

            currencyText              = new UIText("1000");
            currencyText.TextColor    = Color.Yellow;
            currencyText.MarginBottom = 10f;
            currencyText.PaddingLeft  = 15f;
            currencyText.VAlign       = 1f;
            currencyText.HAlign       = 0.5f;
            currencyPanel.Append(currencyText);

            WindowPanel.Append(currencyPanel);
        }
Example #11
0
        public UIPlayerProfileHead()
        {
            textName = new UIText("");
            textName.Top.Set(0, 0f);
            textName.Left.Set(RANK_LEFT_OFFSET + 32, 0f);
            Append(textName);

            rankBar = new UIBar
            {
                BarFrameTex           = ServerSideCharacter2.ModTexturesTable["BarFrameRank"],
                BarFillTex            = Main.magicPixel,
                BarFrameTexCornerSize = new Vector2(6, 6),
                FillerDrawOffset      = new Vector2(6, 6),
                FillerSize            = new Vector2(RANK_BAR_WIDTH - 12, RANK_BAR_HEIGHT - 12)
            };
            rankBar.Top.Set(20f, 0f);
            rankBar.Left.Set(RANK_LEFT_OFFSET, 0f);
            rankBar.Width.Set(RANK_BAR_WIDTH, 0f);
            rankBar.Height.Set(RANK_BAR_HEIGHT, 0f);
            rankBar.Value = 0.3f;
            Append(rankBar);


            rankimage = new UIImageResizable(ServerSideCharacter2.ModTexturesTable["Crown"]);
            rankimage.Top.Set(-10, 0f);
            rankimage.Left.Set(RANK_LEFT_OFFSET, 0f);
            rankimage.UsePosition = false;
            center = new Vector2(RANK_LEFT_OFFSET + 16f, 6);
            Append(rankimage);

            rankLabel = new UIText("300/1000");
            rankLabel.Top.Set(20 + RANK_BAR_HEIGHT + 2f, 0f);
            rankLabel.Left.Set(RANK_LEFT_OFFSET, 0f);
            Append(rankLabel);

            var infopanel = new UIPanel();

            infopanel.Top.Set(20 + RANK_BAR_HEIGHT + 30f, 0f);
            infopanel.Left.Set(0f, 0f);
            infopanel.Width.Set(300f, 0f);
            infopanel.Height.Set(500f, 0f);
            infopanel.SetPadding(10f);

            infoList = new UIAdvList {
                StartPadding = 5f, ListPadding = 10f
            };
            infoList.Width.Set(0f, 1f);
            infoList.Height.Set(0f, 1f);
            infopanel.Append(infoList);


            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            infopanel.Append(uiscrollbar);
            infoList.SetScrollbar(uiscrollbar);


            gucoinText = new UIText("0");
            gucoinText.MarginBottom = 5f;
            gucoinText.TextColor    = Color.Yellow;
            gucoinText.VAlign       = 1f;
            gucoinText.HAlign       = 0.5f;
            infopanel.Append(gucoinText);
            Append(infopanel);
        }
Example #12
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = TemplateMod.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            var fileListPanel = new UIAdvPanel(TemplateMod.ModTexturesTable["Box"]);

            fileListPanel.Top.Set(-FILE_LIST_HEIGHT / 2 + FILELIST_OFFSET_TOP, 0.5f);
            fileListPanel.Left.Set(-FILE_LIST_WIDTH / 2 + FILE_LIST_OFFSET_LEFT, 0.5f);
            fileListPanel.Width.Set(FILE_LIST_WIDTH, 0f);
            fileListPanel.Height.Set(FILE_LIST_HEIGHT, 0f);
            fileListPanel.SetPadding(10f);

            _tilefilesList = new UIAdvGrid();
            _tilefilesList.Width.Set(-25f, 1f);
            _tilefilesList.Height.Set(0f, 1f);
            _tilefilesList.ListPadding = 5f;
            fileListPanel.Append(_tilefilesList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            fileListPanel.Append(uiscrollbar);
            _tilefilesList.SetScrollbar(uiscrollbar);
            WindowPanel.Append(fileListPanel);

            //refreshButton = new UIButton(TemplateMod.ModTexturesTable["Refresh"], false);
            //refreshButton.Top.Set(55, 0f);
            //refreshButton.Left.Set(-35 / 2 - 65, 1f);
            //refreshButton.Width.Set(35, 0f);
            //refreshButton.Height.Set(35, 0f);
            //refreshButton.OnClick += RefreshButton_OnClick;
            //refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            //refreshButton.ButtonChangeColor = Color.White;
            //refreshButton.UseRotation = true;
            //refreshButton.TextureScale = 0.2f;
            //refreshButton.Tooltip = "刷新";
            //WindowPanel.Append(refreshButton);

            var announcement = new UIMessageBox("打开选择模式以后,左键可以选择左上角的点,右键选择右下角的点,然后点击保存即可。");

            announcement.Top.Set(-FILE_LIST_HEIGHT / 2 + FILELIST_OFFSET_TOP - 45, 0.5f);
            announcement.Left.Set(-200, 1f);
            announcement.Width.Set(200, 0f);
            announcement.Height.Set(165, 0f);
            announcement.BackgroundColor = Color.Transparent;
            announcement.BorderColor     = Color.Transparent;
            WindowPanel.Append(announcement);


            Label = new UIText("地形选择器", 0.6f, true);
            Label.Top.Set(-FILE_LIST_HEIGHT / 2 + FILELIST_OFFSET_TOP - 35f, 0.5f);
            var texSize = Main.fontMouseText.MeasureString(Label.Text);

            Label.Left.Set(-FILE_LIST_WIDTH / 2 + FILE_LIST_OFFSET_LEFT, 0.5f);
            WindowPanel.Append(Label);

            selectModeButton = new UICDButton(null, true);
            selectModeButton.Top.Set(350, 0f);
            selectModeButton.Left.Set(-175, 1f);
            selectModeButton.Width.Set(150, 0f);
            selectModeButton.Height.Set(40, 0f);
            selectModeButton.BoxTexture         = TemplateMod.ModTexturesTable["AdvInvBack2"];
            selectModeButton.ButtonDefaultColor = new Color(200, 200, 200);
            selectModeButton.ButtonChangeColor  = Color.White;
            selectModeButton.CornerSize         = new Vector2(12, 12);
            selectModeButton.ButtonText         = "开启选择模式";
            selectModeButton.OnClick           += SelectButtonClick;
            WindowPanel.Append(selectModeButton);


            buildModeButton = new UICDButton(null, true);
            buildModeButton.Top.Set(305, 0f);
            buildModeButton.Left.Set(-175, 1f);
            buildModeButton.Width.Set(150, 0f);
            buildModeButton.Height.Set(40, 0f);
            buildModeButton.BoxTexture         = TemplateMod.ModTexturesTable["AdvInvBack2"];
            buildModeButton.ButtonDefaultColor = new Color(200, 200, 200);
            buildModeButton.ButtonChangeColor  = Color.White;
            buildModeButton.CornerSize         = new Vector2(12, 12);
            buildModeButton.ButtonText         = "开启建筑模式";
            buildModeButton.OnClick           += BuildModeButton_OnClick;
            WindowPanel.Append(buildModeButton);

            saveButton = new UICDButton(null, true);
            saveButton.Top.Set(260, 0f);
            saveButton.Left.Set(-175, 1f);
            saveButton.Width.Set(150, 0f);
            saveButton.Height.Set(40, 0f);
            saveButton.BoxTexture         = TemplateMod.ModTexturesTable["AdvInvBack2"];
            saveButton.ButtonDefaultColor = new Color(200, 200, 200);
            saveButton.ButtonChangeColor  = Color.White;
            saveButton.CornerSize         = new Vector2(12, 12);
            saveButton.ButtonText         = "保存已选择";
            saveButton.OnClick           += SaveButton_OnClick;
            WindowPanel.Append(saveButton);

            refreshButton = new UICDButton(null, true);
            refreshButton.Top.Set(215, 0f);
            refreshButton.Left.Set(-175, 1f);
            refreshButton.Width.Set(150, 0f);
            refreshButton.Height.Set(40, 0f);
            refreshButton.BoxTexture         = TemplateMod.ModTexturesTable["AdvInvBack2"];
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.CornerSize         = new Vector2(12, 12);
            refreshButton.ButtonText         = "刷新";
            refreshButton.OnClick           += RefreshButton_OnClick1;
            WindowPanel.Append(refreshButton);
        }
Example #13
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            _onlinePlayerPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            _onlinePlayerPanel.Top.Set(-FRIENDLIST_HEIGHT / 2 + FRIENDLIST_OFFSET_TOP, 0.5f);
            _onlinePlayerPanel.Left.Set(-FRIENDLIST_WIDTH / 2 + FRIENDLIST_OFFSET_RIGHT, 0.5f);
            _onlinePlayerPanel.Width.Set(FRIENDLIST_WIDTH, 0f);
            _onlinePlayerPanel.Height.Set(FRIENDLIST_HEIGHT, 0f);
            _onlinePlayerPanel.SetPadding(10f);

            onlinelabel = new UIText("排位积分榜(每天更新)");
            onlinelabel.Top.Set(-FRIENDLIST_HEIGHT / 2 + FRIENDLIST_OFFSET_TOP - 25f, 0.5f);
            var texSize = Main.fontMouseText.MeasureString(onlinelabel.Text);

            onlinelabel.Left.Set(-FRIENDLIST_WIDTH / 2 + FRIENDLIST_OFFSET_RIGHT, 0.5f);
            WindowPanel.Append(onlinelabel);
            WindowPanel.Append(_onlinePlayerPanel);

            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(55, 0f);
            refreshButton.Left.Set(-35 / 2 - 65, 1f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.OnClick           += RefreshButton_OnClick;
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            WindowPanel.Append(refreshButton);

            _onlinePlayerList = new UIAdvList();
            _onlinePlayerList.Width.Set(-25f, 1f);
            _onlinePlayerList.Height.Set(0f, 1f);
            _onlinePlayerList.ListPadding    = 5f;
            _onlinePlayerList.OverflowHidden = true;
            _onlinePlayerPanel.Append(_onlinePlayerList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            // uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            _onlinePlayerPanel.Append(uiscrollbar);
            _onlinePlayerList.SetScrollbar(uiscrollbar);


            distanceToEnd = new UIText("00:00:00", 0.6f, true);
            distanceToEnd.Top.Set(20f, 0f);
            distanceToEnd.Left.Set(20f, 0f);
            WindowPanel.Append(distanceToEnd);

            UIAdvPanel infoPanel = new UIAdvPanel();

            infoPanel.Top.Set(-FRIENDLIST_HEIGHT / 2 + FRIENDLIST_OFFSET_TOP, 0.5f);
            infoPanel.Left.Set(440, 0f);
            infoPanel.Width.Set(200, 0f);
            infoPanel.Height.Set(FRIENDLIST_HEIGHT, 0f);
            WindowPanel.Append(infoPanel);

            var announcement = new UIMessageBox(GameLanguage.GetText("rankannouncement"));

            announcement.Width.Set(-25f, 1f);
            announcement.Height.Set(0f, 1f);
            infoPanel.Append(announcement);

            var uiscrollbar2 = new UIAdvScrollBar();

            uiscrollbar2.SetView(100f, 1000f);
            uiscrollbar2.Height.Set(-20f, 1f);
            uiscrollbar2.VAlign = 0.5f;
            uiscrollbar2.HAlign = 1f;
            infoPanel.Append(uiscrollbar2);
            announcement.SetScrollbar(uiscrollbar2);
        }
Example #14
0
        protected override void Initialize(UIAdvPanel WindowPanel)
        {
            uIPlayerBars = new List <UINormalPlayerBar>();

            WindowPanel.MainTexture = ServerSideCharacter2.ModTexturesTable["AdvInvBack1"];
            WindowPanel.Left.Set(Main.screenWidth / 2 - WINDOW_WIDTH / 2, 0f);
            WindowPanel.Top.Set(Main.screenHeight / 2 - WINDOW_HEIGHT / 2, 0f);
            WindowPanel.Width.Set(WINDOW_WIDTH, 0f);
            WindowPanel.Height.Set(WINDOW_HEIGHT, 0f);
            WindowPanel.Color = Color.White * 0.8f;

            _onlinePlayerPanel = new UIAdvPanel(ServerSideCharacter2.ModTexturesTable["Box"])
            {
                CornerSize     = new Vector2(8, 8),
                OverflowHidden = true
            };
            _onlinePlayerPanel.Top.Set(-FRIENDLIST_HEIGHT / 2 + FRIENDLIST_OFFSET_TOP, 0.5f);
            _onlinePlayerPanel.Left.Set(-FRIENDLIST_WIDTH / 2 + FRIENDLIST_OFFSET_LEFT, 0.5f);
            _onlinePlayerPanel.Width.Set(FRIENDLIST_WIDTH, 0f);
            _onlinePlayerPanel.Height.Set(FRIENDLIST_HEIGHT, 0f);
            _onlinePlayerPanel.SetPadding(10f);

            onlinelabel = new UIText("在线玩家  人数: 0");
            onlinelabel.Top.Set(-FRIENDLIST_HEIGHT / 2 + FRIENDLIST_OFFSET_TOP - 25f, 0.5f);
            var texSize = Main.fontMouseText.MeasureString(onlinelabel.Text);

            onlinelabel.Left.Set(-FRIENDLIST_WIDTH / 2 + FRIENDLIST_OFFSET_LEFT, 0.5f);
            WindowPanel.Append(onlinelabel);
            WindowPanel.Append(_onlinePlayerPanel);

            refreshButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Refresh"], false);
            refreshButton.Top.Set(55, 0f);
            refreshButton.Left.Set(-35 / 2 - 65, 1f);
            refreshButton.Width.Set(35, 0f);
            refreshButton.Height.Set(35, 0f);
            refreshButton.OnClick           += RefreshButton_OnClick;
            refreshButton.ButtonDefaultColor = new Color(200, 200, 200);
            refreshButton.ButtonChangeColor  = Color.White;
            refreshButton.UseRotation        = true;
            refreshButton.TextureScale       = 0.2f;
            refreshButton.Tooltip            = "刷新";
            WindowPanel.Append(refreshButton);

            changeSortModeButton = new UIButton(ServerSideCharacter2.ModTexturesTable["Home"], false);
            changeSortModeButton.Top.Set(55, 0f);
            changeSortModeButton.Left.Set(-35 / 2 - 50 - 65, 1f);
            changeSortModeButton.Width.Set(35, 0f);
            changeSortModeButton.Height.Set(35, 0f);
            changeSortModeButton.OnClick           += ChangeSortModeButton_OnClick;
            changeSortModeButton.ButtonDefaultColor = new Color(200, 200, 200);
            changeSortModeButton.ButtonChangeColor  = Color.White;
            changeSortModeButton.Tooltip            = "根据段位排序";
            WindowPanel.Append(changeSortModeButton);

            _onlinePlayerList = new UIAdvList();
            _onlinePlayerList.Width.Set(-25f, 1f);
            _onlinePlayerList.Height.Set(0f, 1f);
            _onlinePlayerList.ListPadding    = 5f;
            _onlinePlayerList.OverflowHidden = true;
            _onlinePlayerPanel.Append(_onlinePlayerList);

            // ScrollBar设定
            var uiscrollbar = new UIAdvScrollBar();

            // uiscrollbar.SetView(100f, 1000f);
            uiscrollbar.Height.Set(0f, 1f);
            uiscrollbar.HAlign = 1f;
            _onlinePlayerPanel.Append(uiscrollbar);
            _onlinePlayerList.SetScrollbar(uiscrollbar);
        }