feat: add descriptive tooltips to filters

This commit is contained in:
aclist committed 2026-08-14 08:09:56 +09:00
1 parent b209c9912d
commit cd4bc7ff4e
2 files changed
+30 -2

No files matched your search

+20
View File
@@ -29,6 +29,22 @@ class FilterManager:
strings.filter_modded: True,
}
# TODO: strings
self.tooltips = {
strings.filter_1pp: "First-person perspective",
strings.filter_day: "In-game time between 0700 and 1659",
strings.filter_empty: "Servers contain no players",
strings.filter_3pp: "Third-person perspective",
strings.filter_night: "In-game time between 1700 and 0659",
strings.filter_full: "Servers have no open slots",
strings.filter_official: "Bohemia official servers",
strings.filter_nonascii: "Server names using non-standard, complex glyphs",
strings.filter_lowpop: "Current population is under 30%",
strings.filter_unofficial: "Third-party servers",
strings.filter_duplicate: "Duplicate of existing servers (usually spoofed)",
strings.filter_modded: "Server has one or more mods",
}
self.active_keyword = ""
self.active_map = (0, all_maps)
self.prior_map = all_maps
@@ -36,6 +52,9 @@ class FilterManager:
self.filters: list
self.enabled_filters = dict(self.default_filters)
def get_tooltips(self) -> dict[str, str]:
return self.tooltips
def set_prior_map(self, name: str) -> None:
self.prior_map = name
@@ -86,6 +105,7 @@ class FilterManager:
self.reinit_map_store()
maps.sort()
for m in maps:
# TODO: strings
if m == "All maps":
continue
self.append_map([m])