Class: UI::SymText
- Inherits:
-
Text
- Object
- LiteRGSS::Disposable
- LiteRGSS::Drawable
- LiteRGSS::Text
- Text
- UI::SymText
- Defined in:
- scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb
Overview
Object that show a text using a method of the data object sent
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from LiteRGSS::Text
#__index__, #align, #bold, #draw_shadow, #fill_color, #height, #italic, #nchar_draw, #opacity, #outline_color, #outline_thickness, #real_width, #size, #text, #viewport, #visible, #width, #x, #y, #z
Instance Method Summary collapse
-
#data=(object)
Set the Object used to show the text.
-
#initialize(font_id, viewport, x, y, width, height, method, align = 0, outlinesize = nil, color = nil, sizeid = nil) ⇒ SymText
constructor
Add a text inside the window, the offset x/y will be adjusted.
Methods inherited from Text
#simple_mouse_in?, #translate_mouse_coords
Methods inherited from LiteRGSS::Text
#load_color, #multiline_text=, new, #set_position, #text_width
Methods inherited from LiteRGSS::Disposable
Constructor Details
#initialize(font_id, viewport, x, y, width, height, method, align = 0, outlinesize = nil, color = nil, sizeid = nil) ⇒ SymText
Add a text inside the window, the offset x/y will be adjusted
338 339 340 341 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 338 def initialize(font_id, , x, y, width, height, method, align = 0, outlinesize = nil, color = nil, sizeid = nil) super(font_id, , x, y, width, height, nil.to_s, align, outlinesize, color, sizeid) @method = method end |
Instance Method Details
#data=(object)
Set the Object used to show the text
345 346 347 348 |
# File 'scripts/01450 Systems/00000 General/00100 UI Generics/00500 HelperSprites.rb', line 345 def data=(object) return unless (self.visible = (object ? true : false)) self.text = object.public_send(@method).to_s end |