Method: Wads::Widget#add_text
- Defined in:
- lib/wads/widgets.rb
#add_text(message, rel_x, rel_y, color = nil, use_large_font = false) ⇒ Object
Add a child text widget using x, y positioning relative to this widget
1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/wads/widgets.rb', line 1508 def add_text(, rel_x, rel_y, color = nil, use_large_font = false) new_text = Text.new(x_pixel_to_screen(rel_x), y_pixel_to_screen(rel_y), , { ARG_COLOR => color, ARG_USE_LARGE_FONT => use_large_font}) new_text.base_z = @base_z new_text.gui_theme = @gui_theme add_child(new_text) new_text end |