mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
parent
5790597a15
commit
dfa058a961
@ -74,7 +74,7 @@ func (g *Game) Update() error {
|
||||
Size: 32,
|
||||
}
|
||||
|
||||
g.face = text.NewMultiFace([]text.Face{en, ja})
|
||||
g.face = text.NewMultiFace(en, ja)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -31,11 +31,10 @@ type MultiFace struct {
|
||||
}
|
||||
|
||||
// NewMultiFace creates a new MultiFace from the given faces.
|
||||
func NewMultiFace(faces []Face) *MultiFace {
|
||||
m := &MultiFace{}
|
||||
m.faces = make([]Face, len(faces))
|
||||
copy(m.faces, faces)
|
||||
return m
|
||||
func NewMultiFace(faces ...Face) *MultiFace {
|
||||
return &MultiFace{
|
||||
faces: faces,
|
||||
}
|
||||
}
|
||||
|
||||
// Metrics implements Face.
|
||||
|
Loading…
Reference in New Issue
Block a user