public sealed class DiagnosticOverlaysThe set of diagnostic overlays, what is switched on, and the one call a frame that draws them.
Remarks
[13](../../../../docs/plan/13-diagnostics.md) § Diagnostic overlays asks for these to be toggleable and present in every build, which is the whole reason they are drawn out of DebugDraw rather than out of the editor: a build with no editor attached and no interface running still has a line pipeline, and that is the build where the numbers are most wanted.
Nothing here polls or samples. An overlay reads what its subsystem already published — Profiler's rings, RingBufferSink's records, a statistics value the host set — so turning one on costs its own drawing and nothing else, and turning all of them off costs one branch each.
Fields and properties (6)
public bool EnabledWhether any overlay is drawn at all — the single switch, for a shipping build.
public OverlayTheme ThemeThe colours and sizes every overlay is drawn with.
public IReadOnlyList<IDiagnosticOverlay> RegisteredEverything registered, in the order it is drawn.
public int DrawnCountHow many panels the last Draw actually put on screen.
public int NoticesDrawnHow many standing notices the last Draw put on screen.
public IReadOnlyList<string> NoticesThe standing notices, in the order they were first raised.
Methods (10)
public void Notice(string key, string text)Raises a standing notice, or replaces the one already under that key.
public bool Forget(string key)Withdraws a standing notice.
public void Add(IDiagnosticOverlay overlay)Adds an overlay, at the end of its corner's stack.
public void Request(IEnumerable<string>? names)Asks for panels by name, whether or not they have been registered yet.
public bool Remove(string name)Removes an overlay.
public IDiagnosticOverlay? Find(string? name)Finds a registered overlay by name, case-insensitively.
public bool? Set(string name, bool? enabled = null)Turns one overlay on or off.
public void RegisterCommands(ConsoleCommands commands)Adds the overlay and overlays commands to a console.
public void DisableAll()Turns every overlay off.
public void Draw(DebugDraw draw, Vector2 viewport, in GameTime time)Draws every enabled overlay into a frame's accumulator.
Used by (17)
- GameSoundsThirdPersonShooter
- PlayerRigThirdPersonShooter
- AppBuilderVixen.App.Hosting
- AppGraphicsVixen.App.Hosting
- ConsoleTestsVixen.Engine.Tests
- DiagnosticOverlaySystemVixen.Engine
- DiagnosticOverlayTestsVixen.Engine.Tests
- GpuOverlayTestsVixen.Engine.Renderer.Tests
- PhysicsSceneTestsVixen.Physics.Tests
- PhysicsSystemsVixen.Physics
- VixenApplicationVixen.App.Hosting
- WaterOverlayTestsVixen.Rendering.Water.Tests
- EditorApplicationVixen.Editor.App
- HostedOverlayTestsVixen.App.Tests
- PlayDiagnosticsVixen.Editor.App
- PlayOverlayTestsVixen.Editor.App.Tests
- PlayPhysicsVixen.Editor.App