From 13aafdc1295431b1fedd08cc5900eb6f3ef9fda4 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 1 Mar 2026 22:09:59 +0100 Subject: Show available shortcuts --- draw.go | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'draw.go') diff --git a/draw.go b/draw.go index 1433d08..62960ea 100644 --- a/draw.go +++ b/draw.go @@ -102,12 +102,20 @@ func drawBottomBanner(screen *ebiten.Image, g *Game) { bannerHeight := float32(200) bannerTop := screenBounds.Dy() - int(bannerHeight) vector.DrawFilledRect(screen, 0, float32(bannerTop), float32(screenBounds.Dx()), bannerHeight, color.White, true) - selectedText := "Selection" + + shortcuts := "[Right-click] Action [A] Patrol [Esc] Deselect" + for _, i := range g.GlobalSelection.Selected { + if g.Mask[i]&ecs.CM_Spawn == ecs.CM_Spawn { + shortcuts += " [S] Spawn unit" + break + } + } + op := &text.DrawOptions{} op.GeoM.Translate(25, float64(float32(bannerTop)+25)) op.ColorScale.ScaleWithColor(color.Black) - text.Draw(screen, selectedText, &text.GoTextFace{ + text.Draw(screen, shortcuts, &text.GoTextFace{ Source: g.FaceSource, - Size: 100, + Size: 60, }, op) } -- cgit v1.3