mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-12 12:08:58 +01:00
doc: Update
This commit is contained in:
parent
20a43a88e8
commit
d8d36c58fb
@ -106,7 +106,6 @@ type Player struct {
|
||||
seBytes []uint8
|
||||
seCh chan []uint8
|
||||
volume128 int
|
||||
previousPos time.Duration
|
||||
}
|
||||
|
||||
var (
|
||||
@ -277,12 +276,6 @@ Press S to toggle Play/Pause
|
||||
Press P to play SE
|
||||
Press Z or X to change volume of the music
|
||||
%s`, ebiten.CurrentFPS(), currentTimeStr)
|
||||
current := p.audioPlayer.Current()
|
||||
prev := p.previousPos
|
||||
p.previousPos = p.audioPlayer.Current()
|
||||
if p.audioPlayer.IsPlaying() && prev == current {
|
||||
msg += "\nLoading..."
|
||||
}
|
||||
ebitenutil.DebugPrint(screen, msg)
|
||||
}
|
||||
|
||||
|
@ -35,14 +35,15 @@ import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"math/rand"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/golang/freetype/truetype"
|
||||
"golang.org/x/image/font"
|
||||
|
||||
"github.com/hajimehoshi/ebiten"
|
||||
"github.com/hajimehoshi/ebiten/ebitenutil"
|
||||
"github.com/hajimehoshi/ebiten/text"
|
||||
|
||||
"github.com/golang/freetype/truetype"
|
||||
"golang.org/x/image/font"
|
||||
)
|
||||
|
||||
const (
|
||||
@ -163,9 +164,11 @@ func update(screen *ebiten.Image) error {
|
||||
|
||||
msg := fmt.Sprintf("FPS: %0.2f", ebiten.CurrentFPS())
|
||||
const x = 20
|
||||
text.Draw(screen, mplusNormalFont, msg, x, 40, 30, color.White)
|
||||
text.Draw(screen, mplusNormalFont, sampleText, x, 80, 30, color.White)
|
||||
text.Draw(screen, mplusBigFont, string(kanjiText), x, 160, 54, codeToColor(kanjiText[0]))
|
||||
text.Draw(screen, mplusNormalFont, msg, x, 40, color.White)
|
||||
text.Draw(screen, mplusNormalFont, sampleText, 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]))
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user