Aegis2D
Modular C++26 2D game engine for networked games
Loading...
Searching...
No Matches
aegis2d::render::MetricsOverlayStyle Struct Reference

Where and how the metrics overlay is drawn. More...

#include <aegis2d/render/metrics_overlay.hpp>

Public Attributes

Vec2 position {8.0F, 8.0F}
 Top-left corner of the panel, in logical pixels.
 
float text_scale = 2.0F
 Scale of the text (TextStyle::scale).
 
float graph_height = 40.0F
 Height of the frame time graph, in logical pixels.
 
float bar_width = 2.0F
 Width of a frame's bar, in logical pixels.
 
double budget_ms = 1000.0 / 60.0
 Frame time budget in milliseconds: a line marks it, half way up the graph, and longer frames are drawn in the slow color.
 
std::int32_t layer = 1'000'000
 Layer of the panel and the bars; the text is drawn one layer above. Keep both layers for the overlay alone, so that its counts leave it out exactly.
 
Color text = rgb(0xFFFFFF)
 Color of the text.
 
Color fast = rgb(0x56B4E9)
 Color of the frames within the budget.
 
Color slow = rgb(0xD55E00)
 Color of the frames over the budget, told from fast with any color vision.
 
Color panel = rgb(0x000000, 0.7F)
 Color of the panel behind.
 

Detailed Description

Where and how the metrics overlay is drawn.

Member Data Documentation

◆ bar_width

float aegis2d::render::MetricsOverlayStyle::bar_width = 2.0F

Width of a frame's bar, in logical pixels.

◆ budget_ms

double aegis2d::render::MetricsOverlayStyle::budget_ms = 1000.0 / 60.0

Frame time budget in milliseconds: a line marks it, half way up the graph, and longer frames are drawn in the slow color.

◆ fast

Color aegis2d::render::MetricsOverlayStyle::fast = rgb(0x56B4E9)

Color of the frames within the budget.

◆ graph_height

float aegis2d::render::MetricsOverlayStyle::graph_height = 40.0F

Height of the frame time graph, in logical pixels.

◆ layer

std::int32_t aegis2d::render::MetricsOverlayStyle::layer = 1'000'000

Layer of the panel and the bars; the text is drawn one layer above. Keep both layers for the overlay alone, so that its counts leave it out exactly.

◆ panel

Color aegis2d::render::MetricsOverlayStyle::panel = rgb(0x000000, 0.7F)

Color of the panel behind.

◆ position

Vec2 aegis2d::render::MetricsOverlayStyle::position {8.0F, 8.0F}

Top-left corner of the panel, in logical pixels.

◆ slow

Color aegis2d::render::MetricsOverlayStyle::slow = rgb(0xD55E00)

Color of the frames over the budget, told from fast with any color vision.

◆ text

Color aegis2d::render::MetricsOverlayStyle::text = rgb(0xFFFFFF)

Color of the text.

◆ text_scale

float aegis2d::render::MetricsOverlayStyle::text_scale = 2.0F

Scale of the text (TextStyle::scale).


The documentation for this struct was generated from the following file: