examples/ui: Refactoring

This commit is contained in:
Hajime Hoshi 2018-01-31 00:49:49 +09:00
parent a2225abcf9
commit d139b8ad6e

View File

@ -373,8 +373,7 @@ func (t *TextBox) Draw(dst *ebiten.Image) {
if y < -lineHeight { if y < -lineHeight {
continue continue
} }
_, h := t.viewSize() if _, h := t.viewSize(); y >= h+lineHeight {
if y >= h+lineHeight {
continue continue
} }
text.Draw(t.contentBuf, line, uiFont, x, y, color.Black) text.Draw(t.contentBuf, line, uiFont, x, y, color.Black)