Class: TextPresenter
- Inherits:
-
Straightedge::Presenter
- Object
- Straightedge::Presenter
- TextPresenter
- Defined in:
- lib/straightedge/gosu/presenters/text_presenter.rb
Instance Method Summary collapse
Instance Method Details
#display(label) ⇒ Object
2 3 4 5 6 |
# File 'lib/straightedge/gosu/presenters/text_presenter.rb', line 2 def display(label) #text = label.is_a?(String) ? label : label.text #puts "--- drawing text '#{label.text}' at #{label.x}, #{label.y} with color #{label.color}" @surface.font.draw(label.text, label.x, label.y, ZOrder::UI, 1.0, 1.0, Straightedge::Colors.hex_value(label.color)) end |