mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 19:28:57 +01:00
examples/flappy: adjust text layouts
This commit is contained in:
parent
3d1df32f43
commit
9fa60e1656
@ -269,7 +269,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
|
|||||||
switch g.mode {
|
switch g.mode {
|
||||||
case ModeTitle:
|
case ModeTitle:
|
||||||
titleTexts = "FLAPPY GOPHER"
|
titleTexts = "FLAPPY GOPHER"
|
||||||
texts = "\n\n\n\n\n\n\nPRESS SPACE KEY\n\nOR A/B BUTTON\n\nOR TOUCH SCREEN"
|
texts = "\n\n\n\n\n\nPRESS SPACE KEY\n\nOR A/B BUTTON\n\nOR TOUCH SCREEN"
|
||||||
case ModeGameOver:
|
case ModeGameOver:
|
||||||
texts = "\nGAME OVER!"
|
texts = "\nGAME OVER!"
|
||||||
}
|
}
|
||||||
@ -298,7 +298,7 @@ func (g *Game) Draw(screen *ebiten.Image) {
|
|||||||
const msg = "Go Gopher by Renee French is\nlicenced under CC BY 3.0."
|
const msg = "Go Gopher by Renee French is\nlicenced under CC BY 3.0."
|
||||||
|
|
||||||
op := &text.DrawOptions{}
|
op := &text.DrawOptions{}
|
||||||
op.GeoM.Translate(screenWidth/2, screenHeight)
|
op.GeoM.Translate(screenWidth/2, screenHeight-smallFontSize/2)
|
||||||
op.ColorScale.ScaleWithColor(color.White)
|
op.ColorScale.ScaleWithColor(color.White)
|
||||||
op.LineHeight = smallFontSize
|
op.LineHeight = smallFontSize
|
||||||
op.PrimaryAlign = text.AlignCenter
|
op.PrimaryAlign = text.AlignCenter
|
||||||
|
Loading…
Reference in New Issue
Block a user