Skip to content

Overlay Class

A surface that’s rendered on top of a host surface.

C#
public sealed class Overlay : UpdateComponent, IComponent, IDisposable

Inheritance objectUpdateComponent

Implements IComponent, IDisposable

C#
public Overlay()

Internal use.

C#
public IRenderStep? RenderStep

The render step used to draw the overlay. This render step is added to the host object and should draw the Surface of the Overlay component.

A surface that’s sized to match.

C#
public ScreenSurface? Surface { get; }

When true, clears the Surface property when this object is added to a IScreenSurface.

C#
public bool ClearOnAdd { get; set; }

Called when the component is added to a host.

C#
public override void OnAdded(IScreenObject host)

host IScreenObject
The host that added the component.

Called when the component is removed from the host.

C#
public override void OnRemoved(IScreenObject host)

host IScreenObject
The host that removed the component.

Called by a host on the update frame.

C#
public override void Update(IScreenObject host, TimeSpan delta)

host IScreenObject
The host calling the component.

delta TimeSpan
The time that has elapsed since this method was last called.

C#
protected void Dispose(bool disposing)

disposing bool

C#
protected ~Overlay()
C#
public void Dispose()