Files
realworld/inc/widget.top_bar.go
T
2026-08-30 22:27:51 +02:00

28 lines
449 B
Go

package inc
import (
inkwell "git.teletypegames.org/engines/inkwell"
)
func init() {
WidgetManager.Register(gated("topbar", &titleBar{
TopBar: &inkwell.TopBar{
Name: "topbar",
Height: TopBarH,
TimeVar: VarArmillaStrip,
},
}))
}
type titleBar struct {
*inkwell.TopBar
}
func (t *titleBar) Tick(ctx *inkwell.UICtx) {
t.LeftText = World.SceneTitle()
if World.Paused() {
t.LeftText += " — paused"
}
t.TopBar.Tick(ctx)
}