Documentation
¶
Overview ¶
Package debug provides the world-owned Panel used to show status readouts, recent messages, and built-in frame and tick rates in the development overlay.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Panel ¶
type Panel struct {
// contains filtered or unexported fields
}
Panel stores status readouts and recent messages for the debug overlay.
Castrum provides it as a world resource. Use Panel.Status for persistent readouts and Panel.Message for the bounded message log. Access the panel from the engine goroutine; it is not safe for concurrent use.
func NewPanel ¶
func NewPanel() *Panel
NewPanel returns a panel with all built-in rate readouts enabled and no messages or status lines.
func (*Panel) Clear ¶
func (p *Panel) Clear()
Clear removes all messages and status slots without changing which built-in rate readouts are enabled.
func (*Panel) Enabled ¶
Enabled reports whether b is enabled for display. Undefined values are always disabled.
func (*Panel) Lines ¶
Lines returns retained messages from oldest to newest. The returned slice is independent of the panel's storage.
func (*Panel) Message ¶
Message appends text to the message log, dropping the oldest message when the log is full.
func (*Panel) Status ¶
Status updates a named readout above the message log, creating its slot on first write. Later writes replace the text in place without changing its order. Empty text hides the line but keeps its slot, so it can reappear in the same position. Write changing readouts each frame; unchanged text remains visible until updated or cleared.
func (*Panel) StatusLines ¶
StatusLines returns the non-empty status lines in first-write order. The returned slice is independent of the panel's storage.