Class MapFilters
Which marker categories the player currently wants to see, remembered between sessions.
public static class MapFilters
- Inheritance
-
MapFilters
- Inherited Members
Remarks
State lives in ClientSettings rather than on the panel, because the minimap will want the same switches eventually and because a filter the player has to set again on every login is worse than no filter at all.
The player's own character is never filterable. A map that can hide where you are is a map with a way to break itself, and no player has ever wanted that.
Fields
Categories
Every category the legend lists: the marker rows, then the place rows.
public static readonly MapFilterCategory[] Categories
Field Value
FilterMaskKey
Configuration key holding the enabled categories as a bit field.
public const string FilterMaskKey = "Map.Filters"
Field Value
MarkerCategories
The categories of the map's own markers, in the order the legend lists them.
public static readonly MapFilterCategory[] MarkerCategories
Field Value
PlaceCategories
The point-of-interest group categories that some marker type falls into, in group order: the legend's PLACES rows.
public static readonly MapFilterCategory[] PlaceCategories
Field Value
Remarks
Derived from the enum rather than listed, so a group with no marker type of its own (Other, whose only kind is the plain Landmark, which keeps its Landmarks row) offers no empty row, and a kind added later brings its group's row with it.
Methods
Categorize(MapMarkerType)
Which category a marker type belongs to.
public static MapFilterCategory Categorize(MapMarkerType type)
Parameters
typeMapMarkerTypeThe marker type.
Returns
- MapFilterCategory
Its category.
CategoryFor(PointOfInterestGroup)
The filter category of a point-of-interest group.
public static MapFilterCategory CategoryFor(PointOfInterestGroup group)
Parameters
groupPointOfInterestGroupThe group.
Returns
- MapFilterCategory
Its category.
GroupClassSuffix(PointOfInterestGroup)
The USS class suffix of a point-of-interest group: its name lowercased (the colour token is --map-poi-suffix).
public static string GroupClassSuffix(PointOfInterestGroup group)
Parameters
groupPointOfInterestGroup
Returns
IsEnabled(MapFilterCategory)
Whether a category is currently shown.
public static bool IsEnabled(MapFilterCategory category)
Parameters
categoryMapFilterCategoryThe category.
Returns
- bool
True when its markers should be drawn.
IsEnabled(MapMarkerType)
Whether a marker type is currently shown.
public static bool IsEnabled(MapMarkerType type)
Parameters
typeMapMarkerTypeThe marker type.
Returns
- bool
True when the marker should be drawn.
Label(MapFilterCategory)
The player-facing name of a category.
public static string Label(MapFilterCategory category)
Parameters
categoryMapFilterCategoryThe category.
Returns
- string
Its label.
SetEnabled(MapFilterCategory, bool)
Shows or hides a category.
public static void SetEnabled(MapFilterCategory category, bool enabled)
Parameters
categoryMapFilterCategoryThe category.
enabledboolWhether its markers should be drawn.
TryGroupOf(MapFilterCategory, out PointOfInterestGroup)
The point-of-interest group a category stands for, when it is a place category.
public static bool TryGroupOf(MapFilterCategory category, out PointOfInterestGroup group)
Parameters
categoryMapFilterCategoryThe category.
groupPointOfInterestGroupThe group, or Other when the category is not a place category.
Returns
- bool
True for a place category.