aboutsummaryrefslogtreecommitdiff
path: root/go/assets
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-12-28 11:34:53 +0100
committerFlorian Fischer <florian.fischer@muhq.space>2025-01-27 16:43:59 +0100
commitd7bac40f11fc18121ca3d26175fb85f187a6f24c (patch)
tree0cfd498fa94fdcef079761d04768796f7d8e3ea4 /go/assets
parent660c175c66c5ba6af55c1c86a59d49736c191115 (diff)
downloadmuhqs-game-d7bac40f11fc18121ca3d26175fb85f187a6f24c.tar.gz
muhqs-game-d7bac40f11fc18121ca3d26175fb85f187a6f24c.zip
migrate to ebiten/v2/text/v2
Diffstat (limited to 'go/assets')
-rw-r--r--go/assets/retrieve.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/go/assets/retrieve.go b/go/assets/retrieve.go
index d9b40643..27a06124 100644
--- a/go/assets/retrieve.go
+++ b/go/assets/retrieve.go
@@ -9,7 +9,7 @@ import (
"strings"
"github.com/hajimehoshi/ebiten/v2"
- "github.com/hajimehoshi/ebiten/v2/text"
+ "github.com/hajimehoshi/ebiten/v2/text/v2"
"muhq.space/muhqs-game/go/font"
)
@@ -94,7 +94,10 @@ func GetGenericSymbol(symbol string) *ebiten.Image {
if !found {
genericBase := GetSymbol("generic_base")
img = ebiten.NewImageFromImage(genericBase)
- text.Draw(img, symbol, font.Font24, 5, 27, color.Black)
+ op := &text.DrawOptions{}
+ op.GeoM.Translate(5, 7)
+ op.ColorScale.ScaleWithColor(color.Black)
+ text.Draw(img, symbol, font.Font24, op)
}
return img
}