mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
blocks: Change font color
This commit is contained in:
parent
bb1d168154
commit
1c4a652a6d
@ -64,8 +64,10 @@ func drawRect(r *ebiten.Image, x, y, width, height int) error {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var fontColor = color.NRGBA{0x40, 0x40, 0xff, 0xff}
|
||||||
|
|
||||||
func drawTextBox(r *ebiten.Image, label, content string, x, y, width int) error {
|
func drawTextBox(r *ebiten.Image, label, content string, x, y, width int) error {
|
||||||
if err := drawTextWithShadow(r, label, x, y, 1, color.NRGBA{0x00, 0x00, 0x80, 0xff}); err != nil {
|
if err := drawTextWithShadow(r, label, x, y, 1, fontColor); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
y += blockWidth
|
y += blockWidth
|
||||||
@ -281,7 +283,7 @@ func (s *GameScene) Draw(r *ebiten.Image) error {
|
|||||||
// Draw next
|
// Draw next
|
||||||
x := fieldX + fieldWidth + blockWidth*2
|
x := fieldX + fieldWidth + blockWidth*2
|
||||||
y := fieldY
|
y := fieldY
|
||||||
if err := drawTextWithShadow(r, "NEXT", x, y, 1, color.NRGBA{0x00, 0x00, 0x80, 0xff}); err != nil {
|
if err := drawTextWithShadow(r, "NEXT", x, y, 1, fontColor); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
nextX := x
|
nextX := x
|
||||||
|
Loading…
Reference in New Issue
Block a user