diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2024-12-28 11:34:53 +0100 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-08-20 15:57:13 +0200 |
| commit | ba4f24e71e4970c3095971fe6c5df7f829cab3e5 (patch) | |
| tree | b305956002f828dab115f2617fb039b5b8f5d0d7 /go/assets | |
| parent | bfab1b8f10ce006dd4822ac3e82125ec226597f5 (diff) | |
| download | muhqs-game-ba4f24e71e4970c3095971fe6c5df7f829cab3e5.tar.gz muhqs-game-ba4f24e71e4970c3095971fe6c5df7f829cab3e5.zip | |
migrate to ebiten/v2/text/v2
Diffstat (limited to 'go/assets')
| -rw-r--r-- | go/assets/retrieve.go | 7 |
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 } |
