/// <summary> /// Creates the button that says "Country" in the filter. /// </summary> private void CreateCountryButton() { CountryFilterButton = new SelectableBorderedTextButton("Country", ColorHelper.HexToColor("#9d84ec"), ConfigManager.SelectedOnlineUserFilterType.Value == OnlineUserFilterType.Country) { Parent = TextFilters, Alignment = Alignment.MidLeft, Size = new ScalableVector2(0, AllFilterButton.Height), X = FriendsFilterButton.X + FriendsFilterButton.Width + 10, Text = { FontSize = 11, Font = Fonts.SourceSansProSemiBold } }; CountryFilterButton.Width = CountryFilterButton.Text.Width + 8; CountryFilterButton.Height = CountryFilterButton.Text.Height + 6; CountryFilterButton.Clicked += (sender, args) => { ConfigManager.SelectedOnlineUserFilterType.Value = OnlineUserFilterType.Country; Overlay.OnlineUserList?.FilterUsers(); }; }
/// <summary> /// The button that says "All" in the filter /// </summary> private void CreateAllButton() { AllFilterButton = new SelectableBorderedTextButton("All", ColorHelper.HexToColor("#9d84ec"), ConfigManager.SelectedOnlineUserFilterType.Value == OnlineUserFilterType.All) { Parent = TextFilters, Alignment = Alignment.MidLeft, Size = new ScalableVector2(0, TextFilters.Height), X = TextFilters.Width + 5, Text = { FontSize = 11, ForceDrawAtSize = false, Font = Fonts.SourceSansProSemiBold } }; AllFilterButton.Width = AllFilterButton.Text.Width + 8; AllFilterButton.Height = AllFilterButton.Text.Height + 6; AllFilterButton.Clicked += (sender, args) => { ConfigManager.SelectedOnlineUserFilterType.Value = OnlineUserFilterType.All; Overlay.OnlineUserList?.FilterUsers(); }; }