Interface IHighlightRenderer
ENGINE: Interface for pluggable highlight/selection rendering implementations. ENGINE provides default (GPU compute-based fill/border). GAME can register custom implementations via MapRendererRegistry.
Examples of custom implementations:
- Animated pulse effect
- Glow/bloom effect
- Custom outline styles
- Shader-based selection
public interface IHighlightRenderer
Properties
DisplayName
Display name for UI/debugging
string DisplayName { get; }
Property Value
- string
RendererId
Unique identifier for this renderer (e.g., "Default", "Glow", "Pulse")
string RendererId { get; }
Property Value
- string
RequiresPerFrameUpdate
Whether this renderer requires per-frame updates (e.g., animated effects)
bool RequiresPerFrameUpdate { get; }
Property Value
- bool
Methods
ApplyToMaterial(Material, HighlightStyleParams)
Apply visual parameters to the material (colors, effects, etc.) Called when visual style parameters change.
void ApplyToMaterial(Material material, HighlightStyleParams styleParams)
Parameters
materialMaterialstyleParamsHighlightStyleParams
ClearHighlight()
Clear all highlights.
void ClearHighlight()
Dispose()
Cleanup resources when renderer is deactivated or destroyed.
void Dispose()
GetHighlightedProvince()
Get the currently highlighted province ID.
ushort GetHighlightedProvince()
Returns
- ushort
HighlightCountry(ushort, Color)
Highlight all provinces owned by a country.
void HighlightCountry(ushort countryID, Color color)
Parameters
countryIDushortCountry ID to highlight
colorColorHighlight color with alpha
HighlightProvince(ushort, Color, HighlightMode)
Highlight a single province.
void HighlightProvince(ushort provinceID, Color color, HighlightMode mode)
Parameters
provinceIDushortProvince to highlight (0 = clear)
colorColorHighlight color with alpha
modeHighlightModeFill or border-only mode
Initialize(MapTextureManager, HighlightRendererContext)
Initialize the renderer with required resources. Called once when renderer is first activated.
void Initialize(MapTextureManager textureManager, HighlightRendererContext context)
Parameters
textureManagerMapTextureManagercontextHighlightRendererContext
OnRenderFrame()
Called per-frame for renderers that need continuous updates (animations). Only called if RequiresPerFrameUpdate is true.
void OnRenderFrame()