dirs
ci/woodpecker/push/ebitengine Pipeline was successful

This commit is contained in:
2026-08-30 23:21:06 +02:00
parent 28b1662195
commit c5c0c02c03
115 changed files with 1083 additions and 950 deletions
+38
View File
@@ -0,0 +1,38 @@
package widget
import (
inkwell "git.teletypegames.org/engines/inkwell"
"git.teletypegames.org/games/realworld/inc"
"git.teletypegames.org/games/realworld/inc/world"
)
type Widget = inkwell.Widget
var Manager = inkwell.NewManager[Widget]()
const (
ScreenW = 640
ScreenH = 380
LineH = inkwell.GlyphH + 2
Pad = 6
TopBarH = LineH + 2
DividerX = 394
HUDH = Pad + LineH + 4 + invSlot*2 + invGap + Pad
HUDTop = ScreenH - HUDH
statusY = HUDTop + Pad
slotsY = HUDTop + Pad + LineH
slotsH = LineH*2 + Pad*2
invY = slotsY + 4
invSlot = 40
invGap = 4
)
var (
whenPlaying = inkwell.VarEq(inc.VarMode, string(world.ModePlay))
whenCutscene = inkwell.VarEq(inc.VarMode, string(world.ModeCutscene))
whenUnpaused = inkwell.And(whenPlaying, inkwell.Not(inkwell.VarEq(inc.VarNote, inc.NotePaused)))
)