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.
263 264 265 266 |
# File 'lib/zgomot/ui/windows.rb', line 263 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.
262 263 264 |
# File 'lib/zgomot/ui/windows.rb', line 262 def color @color end |
#left ⇒ Object (readonly)
Returns the value of attribute left.
262 263 264 |
# File 'lib/zgomot/ui/windows.rb', line 262 def left @left end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
262 263 264 |
# File 'lib/zgomot/ui/windows.rb', line 262 def text @text end |
#top ⇒ Object (readonly)
Returns the value of attribute top.
262 263 264 |
# File 'lib/zgomot/ui/windows.rb', line 262 def top @top end |
Instance Method Details
#display(new_text = nil) ⇒ Object
267 268 269 270 271 272 |
# File 'lib/zgomot/ui/windows.rb', line 267 def display(new_text=nil) @text = new_text || text set_color(color) { write(top, left, text) } end |