Class: Zgomot::UI::TextWindow
- Includes:
- Utils
- Defined in:
- lib/zgomot/ui/windows.rb
Instance Attribute Summary collapse
-
#color ⇒ Object
readonly
Returns the value of attribute color.
-
#left ⇒ Object
readonly
Returns the value of attribute left.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
-
#top ⇒ Object
readonly
Returns the value of attribute top.
Instance Method Summary collapse
- #display(new_text = nil) ⇒ Object
-
#initialize(text, color, top, left) ⇒ TextWindow
constructor
A new instance of TextWindow.
Methods included from Utils
Constructor Details
#initialize(text, color, top, left) ⇒ TextWindow
Returns a new instance of TextWindow.
336 337 338 339 |
# File 'lib/zgomot/ui/windows.rb', line 336 def initialize(text, color, top, left) @color, @top, @left, @text = color, top, left, text display(text) end |
Instance Attribute Details
#color ⇒ Object (readonly)
Returns the value of attribute color.
335 336 337 |
# File 'lib/zgomot/ui/windows.rb', line 335 def color @color end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
335 336 337 |
# File 'lib/zgomot/ui/windows.rb', line 335 def left @left end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
335 336 337 |
# File 'lib/zgomot/ui/windows.rb', line 335 def text @text end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
335 336 337 |
# File 'lib/zgomot/ui/windows.rb', line 335 def top @top end |
Instance Method Details
#display(new_text = nil) ⇒ Object
340 341 342 343 344 345 |
# File 'lib/zgomot/ui/windows.rb', line 340 def display(new_text=nil) @text = new_text || text set_color(color) { write(top, left, text) } end |