mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
text: Swap arguments face and text
This commit is contained in:
parent
94c4a76dcf
commit
b58d8bb996
@ -151,10 +151,10 @@ func update(screen *ebiten.Image) error {
|
||||
|
||||
msg := fmt.Sprintf("FPS: %0.2f", ebiten.CurrentFPS())
|
||||
const x = 20
|
||||
text.Draw(screen, mplusNormalFont, msg, x, 40, color.White)
|
||||
text.Draw(screen, mplusNormalFont, sampleText, x, 80, color.White)
|
||||
text.Draw(screen, msg, mplusNormalFont, x, 40, color.White)
|
||||
text.Draw(screen, sampleText, mplusNormalFont, x, 80, color.White)
|
||||
for i, line := range strings.Split(string(kanjiText), "\n") {
|
||||
text.Draw(screen, mplusBigFont, line, x, 160+54*i, codeToColor(kanjiText[0]))
|
||||
text.Draw(screen, line, mplusBigFont, x, 160+54*i, codeToColor(kanjiText[0]))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ var textM sync.Mutex
|
||||
// It is OK to call this function with a same text and a same face at every frame.
|
||||
//
|
||||
// This function is concurrent-safe.
|
||||
func Draw(dst *ebiten.Image, face font.Face, text string, x, y int, clr color.Color) {
|
||||
func Draw(dst *ebiten.Image, text string, face font.Face, x, y int, clr color.Color) {
|
||||
textM.Lock()
|
||||
|
||||
n := now()
|
||||
|
Loading…
Reference in New Issue
Block a user