Fix examples
This commit is contained in:
parent
b382e95c05
commit
e8965ee263
3 changed files with 5 additions and 5 deletions
|
@ -436,12 +436,12 @@ func (g *Game) Draw() {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// Draw text
|
// Draw text
|
||||||
rl.DrawText("Floppy Gopher", rl.GetScreenWidth()/2-rl.MeasureText("Floppy Gopher", 40)/2, rl.GetScreenHeight()/2-150, 40, rl.RayWhite)
|
rl.DrawText("Floppy Gopher", int32(rl.GetScreenWidth())/2-rl.MeasureText("Floppy Gopher", 40)/2, int32(rl.GetScreenHeight())/2-150, 40, rl.RayWhite)
|
||||||
|
|
||||||
if runtime.GOOS == "android" {
|
if runtime.GOOS == "android" {
|
||||||
rl.DrawText("[TAP] TO PLAY", rl.GetScreenWidth()/2-rl.MeasureText("[TAP] TO PLAY", 20)/2, rl.GetScreenHeight()/2-50, 20, rl.Black)
|
rl.DrawText("[TAP] TO PLAY", int32(rl.GetScreenWidth())/2-rl.MeasureText("[TAP] TO PLAY", 20)/2, int32(rl.GetScreenHeight())/2-50, 20, rl.Black)
|
||||||
} else {
|
} else {
|
||||||
rl.DrawText("[ENTER] TO PLAY", rl.GetScreenWidth()/2-rl.MeasureText("[ENTER] TO PLAY", 20)/2, rl.GetScreenHeight()/2-50, 20, rl.Black)
|
rl.DrawText("[ENTER] TO PLAY", int32(rl.GetScreenWidth())/2-rl.MeasureText("[ENTER] TO PLAY", 20)/2, int32(rl.GetScreenHeight())/2-50, 20, rl.Black)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw Gopher
|
// Draw Gopher
|
||||||
|
|
|
@ -231,7 +231,7 @@ func (g *Game) Draw() {
|
||||||
rl.DrawText("GAME PAUSED", g.ScreenWidth/2-rl.MeasureText("GAME PAUSED", 40)/2, g.ScreenHeight/2-40, 40, rl.Gray)
|
rl.DrawText("GAME PAUSED", g.ScreenWidth/2-rl.MeasureText("GAME PAUSED", 40)/2, g.ScreenHeight/2-40, 40, rl.Gray)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
rl.DrawText("PRESS [ENTER] TO PLAY AGAIN", rl.GetScreenWidth()/2-rl.MeasureText("PRESS [ENTER] TO PLAY AGAIN", 20)/2, rl.GetScreenHeight()/2-50, 20, rl.Gray)
|
rl.DrawText("PRESS [ENTER] TO PLAY AGAIN", int32(rl.GetScreenWidth())/2-rl.MeasureText("PRESS [ENTER] TO PLAY AGAIN", 20)/2, int32(rl.GetScreenHeight())/2-50, 20, rl.Gray)
|
||||||
}
|
}
|
||||||
|
|
||||||
rl.EndDrawing()
|
rl.EndDrawing()
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
package rl
|
package rl
|
||||||
|
|
||||||
/*
|
/*
|
||||||
#cgo CFLAGS: -std=gnu99 -Wno-missing-braces -Wno-unused-result -Wno-stringop-overflow
|
#cgo CFLAGS: -std=gnu99 -Wno-missing-braces -Wno-unused-result
|
||||||
*/
|
*/
|
||||||
import "C"
|
import "C"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue