class Sc20XX::Views::Splash

is responsible for drawing the wonderful splash screen

Constants

CONTENT

Protected Instance Methods

draw() click to toggle source
# File lib/sc20XX/views/splash.rb, line 54
def draw
  0.upto(top) { line '' }
  lines.each do |row|
    with_color(:green) do
      line ' ' * left + row
    end
  end
end
left() click to toggle source
# File lib/sc20XX/views/splash.rb, line 42
def left
  (rect.width - lines.map(&:length).max) / 2
end
lines() click to toggle source
# File lib/sc20XX/views/splash.rb, line 50
def lines
  CONTENT.split("\n")
end
refresh() click to toggle source
Calls superclass method Sc20XX::UI::View#refresh
# File lib/sc20XX/views/splash.rb, line 63
def refresh
  super

  # show until any keypress
  @window.getch
end
top() click to toggle source
# File lib/sc20XX/views/splash.rb, line 46
def top
  (rect.height - lines.size) / 2
end