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,
|
Size: 32,
|
||||||
}
|
}
|
||||||
|
|
||||||
g.face = text.NewMultiFace([]text.Face{en, ja})
|
g.face = text.NewMultiFace(en, ja)
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
@ -31,11 +31,10 @@ type MultiFace struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// NewMultiFace creates a new MultiFace from the given faces.
|
// NewMultiFace creates a new MultiFace from the given faces.
|
||||||
func NewMultiFace(faces []Face) *MultiFace {
|
func NewMultiFace(faces ...Face) *MultiFace {
|
||||||
m := &MultiFace{}
|
return &MultiFace{
|
||||||
m.faces = make([]Face, len(faces))
|
faces: faces,
|
||||||
copy(m.faces, faces)
|
}
|
||||||
return m
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Metrics implements Face.
|
// Metrics implements Face.
|
||||||
|
Loading…
Reference in New Issue
Block a user