Vixen
02b45cc4
csharp
public sealed class OverlaySurface

The screen an overlay draws on: it hands out panels from the four corners and turns text into the same debug lines everything else here produces.

No guide page documents this yet — the page shows what the code says about itself.

Remarks

Everything an overlay draws is a DebugDraw screen line. There is no second renderer, no font atlas and no UI document — which is what makes the overlays available in a shipping build, in the frame where the asset system or the interface is the thing that is broken, and on a platform where the editor is not running.

⚠ Panels are laid out in the order they are drawn, per corner. Registration order in DiagnosticOverlays is therefore the order down the screen, and turning one off closes the gap rather than leaving one.

Fields and properties (4)

  • public DebugDraw Draw

    Where the lines go.

  • public Vector2 Viewport

    How big the screen is, in pixels.

  • public OverlayTheme Theme

    The colours and sizes in force.

  • public float RowHeight

    How far apart two rows of text sit.

Methods (5)

  • public float MeasureWidth(ReadOnlySpan<char> text)

    How wide a string draws at the theme's text size.

  • public float HeightForRows(int rows, bool titled = true)

    How tall a panel with this many rows and an optional title needs to be.

  • public OverlayRegion Panel(OverlayAnchor anchor, float width, float height, ReadOnlySpan<char> title = default(ReadOnlySpan<char>))

    Takes a panel out of a corner's stack.

  • public OverlayRegion Panel(OverlayAnchor anchor, float width, int rows, ReadOnlySpan<char> title = default(ReadOnlySpan<char>))

    Takes a panel sized to hold a given number of rows.

  • public void Text(Vector2 position, ReadOnlySpan<char> text, Color4 colour)

    Writes text in screen coordinates, at the theme's size.

Used by (9)

  • AudioOverlayVixen.Audio
  • ConsoleOverlayVixen.Engine
  • DiagnosticOverlaysVixen.Engine
  • FrameGraphOverlayVixen.Engine
  • FrameStatsOverlayVixen.Engine
  • IDiagnosticOverlayVixen.Engine
  • LogOverlayVixen.Engine
  • OverlayRegionVixen.Engine
  • RecordingVixen.Engine.Tests