ddnet/data
Robert Müller 7c9b1fbbb4 Add tabs for favorite communities, separate country/type filters
Support adding up to three communities as favorites in the server browser. Favorites can be changed with favorite buttons which are shown in the community filter on the Internet and Favorites tabs. The commands `add_favorite_community` and `remove_favorite_community` are added to change the favorite communities via the console and for saving the favorite communities to the config file. For the favorite communities, additional tabs using the communities' icons are shown in the server browser next to the Internet, LAN and Favorites tabs. Each community tab shows only the servers from the respective community, hence the community filters UI is not shown on the community tabs but only on the Internet and Favorites tabs. The country and type filters on community tabs cover only the countries and types from the respective community. Favorite communities are added from left to right. When more than three favorite communities are added, the oldest (leftmost) favorite community will be removed from the list.

When starting the client for the first time, i.e. with `cl_show_welcome 1`, the DDNet tab will be created as the only favorite community and selected initially. The community, country and type filters are unset when starting for the first time, so the Internet tab now shows all servers per default.

When starting with a `ui_page` for a favorite community that is not configured, the page is reset to the Internet tab. This also affects those who upgrade from versions with the old DDNet and KoG tabs. The server browser is now also correctly updated when changing `ui_page` via the console.

Track country and type filters for every community separately, to avoid filters resetting when switching between community tabs or changing the community filter. The commands `add_excluded_community`, `remove_excluded_community`, `add_excluded_country`, `remove_excluded_country`, `add_excluded_type` and `remove_excluded_type` are added to change the exclusion filters via the console and for saving the exclusion filters to the config file.

Render community filters above the toolbox (filter, info and friends) tabs when on the Internet and Favorites tab, so this setting is more visible and can be changed also when the other toolbox tabs are selected.

Add icon for the none community, based on the tee country flag color. This icon is hard-coded in the client, as the none community also is, so fetching the icon from the server would be inconvenient. Load community icons already when rendering the menu instead of only when rendering the server browser, so the icons are immediately available when using the start menu.

Find tutorial server by searching for community type "Tutorial" instead of searching for "(Tutorial)" in the server name.

Avoid cleaning favorite communities and filters when there are no communities, i.e. when the DDNet info failed to be loaded or does not contain any communities, to avoid losing all favorite communities and filters in this case.

Closes #7774.
2024-02-03 21:12:23 +01:00
..
assets Revert "Add comic emoticons by Ravie" 2023-03-01 00:10:37 +01:00
audio Rename rifle to laser 2019-11-22 15:37:18 +01:00
communityicons Add tabs for favorite communities, separate country/type filters 2024-02-03 21:12:23 +01:00
countryflags Fix country flags MW and MQ not being loaded anymore 2023-09-13 18:56:10 +02:00
editor Add cursor types and use resize cursor for dragbars 2023-12-28 18:35:23 +01:00
fonts Add font index, support font family variants depending on language 2023-08-01 19:30:25 +02:00
languages Update spanish.txt 2024-01-22 12:07:29 -03:00
mapres Update grass_doodads_0.7.png to match upstream 2023-07-29 14:02:28 +02:00
maps Check red tele and dragger in CI 2023-11-17 21:49:31 +01:00
maps7 Update Tutorial map by unique_2 2022-10-03 10:17:13 +02:00
menuimages Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
shader Fix multi sampling accuracy 2023-12-17 10:39:28 +01:00
skins additional optimization 2023-09-11 17:23:39 -04:00
themes Fix winter theme 2023-09-20 15:04:38 +02:00
arrow.png Optimize PNGs 2016-04-27 01:27:57 +02:00
autoexec_server.cfg Remove unused commands from autoexec cfg 2023-10-01 11:42:58 +02:00
blob.png Merge remote-tracking branch 'timakro/new_hookthrough' 2016-04-27 18:59:51 +02:00
censorlist.txt Implement censoring words on server 2020-09-18 19:18:08 +02:00
console.png Optimize PNGs 2016-04-27 01:27:57 +02:00
console_bar.png Optimize PNGs 2016-04-27 01:27:57 +02:00
debug_font.png Optimize PNGs 2016-04-27 01:27:57 +02:00
emoticons.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
extras.png simplify the snowflake 2022-06-30 00:02:51 +02:00
game.png Move ninja shield to other position (fixes #5047) 2022-04-30 11:42:26 +02:00
gui_buttons.png Optimize PNGs 2016-04-27 01:27:57 +02:00
gui_cursor.png 0.7 cursor 2020-09-15 16:18:12 +02:00
gui_icons.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
gui_logo.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
hud.png Add new textures by ravie; Also add no gun hit for teleport gun 2022-06-25 16:05:38 +02:00
particles.png Revert "Dilate & optimize non-dilated images" 2021-02-03 20:40:10 +01:00
race_flag.png Add finish info messages. 2023-11-26 17:29:40 +01:00
strong_weak.png change name file 2021-08-14 18:40:58 +05:00
wordlist.txt Generate passphrase for save-code 2020-06-15 11:14:15 +02:00