electrosim.rendering.overlay#

Functions

draw_overlay(screen, font, sim_state[, ...])

Render a multi-line overlay with FPS, counts, energies, and controls.

draw_overlay(screen, font, sim_state, overlay_enabled=True)[source]#

Render a multi-line overlay with FPS, counts, energies, and controls.

Parameters:
  • screen (pygame.Surface) – Target surface.

  • font (pygame.font.Font) – Font used for text rendering.

  • sim_state (dict) – Simulation state values including fps, n, speed_label, dt_s, substeps, energies, and optional profiling timings under key profile.

  • overlay_enabled (bool) – Whether to render the overlay. If False, nothing is drawn.

Return type:

None