Class: Diamante::Scene::UI
- Inherits:
-
Object
- Object
- Diamante::Scene::UI
- Defined in:
- lib/diamante/scenes/ui.rb
Instance Method Summary collapse
-
#initialize(header, slides) ⇒ UI
constructor
A new instance of UI.
- #render ⇒ Object
Constructor Details
Instance Method Details
#render ⇒ Object
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/diamante/scenes/ui.rb', line 20 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 |