Method: AuthorEngine::Part::GosuGraphics#text
- Defined in:
- lib/author_engine/game/gosu/parts/graphics.rb
#text(text, x = 0, y = 0, size = 4, z = 0, color = white) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/author_engine/game/gosu/parts/graphics.rb', line 8 def text(text, x = 0, y = 0, size = 4, z = 0, color = white) ||= {} font = nil if .dig(size) font = .dig(size) else font = ([size] = Gosu::Font.new(size, name: Text::FONT_DEFAULT)) end font.draw_markup(text, x, y, z, 1, 1, color) end |