Skip to content

Game.Notifications.IconLayerMask

Assembly: Assembly-CSharp
Namespace: Game.Notifications

Type: enum

Base: System.UInt32

Summary: IconLayerMask is an unsigned-integer enum used to identify one or more icon layers in the notification subsystem. The defined values are powers of two (1, 2, 4) so they can be combined as a bitmask to represent multiple layers simultaneously. Note: the enum in source is not decorated with [Flags], but it is commonly used as a bitmask in code.


Fields

  • None = 0u Represents no layer / empty mask. Use when you want to indicate the absence of any icon layer.

  • Default = 1u Primary/default icon layer. Typically used for regular notification icons.

  • Marker = 2u Marker layer, often used for map markers or special overlay icons.

  • Transaction = 4u Transaction layer, used for icons related to transactions or bookkeeping notifications.

Properties

  • This enum defines no properties.
    Enums don't expose instance properties beyond the standard System.Enum members; treat IconLayerMask values as plain integral flags.

Constructors

  • Enums do not define public constructors in C#. Instances are created by assigning one of the defined values or by casting an integral value to IconLayerMask.

Methods

  • The enum type itself does not define custom methods. You can use standard System.Enum and integral operations:
  • ToString() — obtains the name of the enum value(s).
  • HasFlag(Enum) — convenient for checking flags (note: HasFlag uses boxing and can be slower).
  • Bitwise operators (|, &, ~) — recommended for fast flag combination and checks.

Examples of common operations: - Combine layers: IconLayerMask mask = IconLayerMask.Default | IconLayerMask.Marker; - Check a layer: bool hasMarker = (mask & IconLayerMask.Marker) != 0;

Usage Example

// Combine layers into a mask
IconLayerMask mask = IconLayerMask.Default | IconLayerMask.Marker;

// Check if a specific layer is present
bool hasMarker = (mask & IconLayerMask.Marker) != 0;

// Safe check using HasFlag (works but involves boxing)
bool hasDefault = mask.HasFlag(IconLayerMask.Default);

// Clearing a layer
mask &= ~IconLayerMask.Marker;

// Casting to underlying integer
uint raw = (uint)mask;

{{ This enum is intended for use within the game's notification/icon rendering code to select which visual layers an icon should belong to. Although not annotated with [Flags], treat it as a flag-style enum when combining or testing values. }}