Class: Diamante::Scene::UI
Instance Attribute Summary collapse
-
#slides ⇒ Object
Returns the value of attribute slides.
Instance Method Summary collapse
-
#initialize(config) ⇒ UI
constructor
A new instance of UI.
- #render ⇒ Object
Methods inherited from Base
Constructor Details
Instance Attribute Details
#slides ⇒ Object
Returns the value of attribute slides.
11 12 13 |
# File 'lib/diamante/scenes/ui.rb', line 11 def @slides end |
Instance Method Details
#render ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/diamante/scenes/ui.rb', line 23 def render text = " #{@header} (#{@slides.index + 1}/#{@slides.count}) " col = @width - text.length - 1 text = @pastel.white(text) ANSI.print_text_at(1, col, text) text = " q|→|← " text = @pastel.white(text) ANSI.print_text_at(@height - 2, 1, text) text = " #{Time.now} " col = @width - text.length - 1 text = @pastel.white(text) ANSI.print_text_at(@height - 2, col, text) end |