aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-03-01 22:09:59 +0100
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-03-01 22:09:59 +0100
commit13aafdc1295431b1fedd08cc5900eb6f3ef9fda4 (patch)
treec2472cb50f1faa83f15e1e953871c1b966b5773c
parent5728ebc309b4753c939d751c7fd489b108e5dc09 (diff)
Show available shortcuts
-rw-r--r--README.md2
-rw-r--r--draw.go14
2 files changed, 11 insertions, 5 deletions
diff --git a/README.md b/README.md
index 2663295..8954ce6 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,6 @@
- [ ] ecs: bitfield for fast checking
- [ ] ecs: rename to systems
- [ ] perf: measure frame budget
-- [ ] extract todos in todo list
- [ ] abstraction between ebiten and update to handle inputs in a simulation?
- [ ] getMoveMap could be a maintained index
- [ ] entityAt could be a maintained index
@@ -30,7 +29,6 @@
## Bugs
-- [ ] if B is < 1 cell away, it will go and merge with A
- [ ] stops moving if someone settles at destination
## Dependencies
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)
}