class Soundcloud9000::Views::Splash

is responsible for drawing the wonderful splash screen

Constants

CONTENT

Protected Instance Methods

draw() click to toggle source
# File lib/soundcloud9000/views/splash.rb, line 52
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/soundcloud9000/views/splash.rb, line 40
def left
  (rect.width - lines.map(&:length).max) / 2
end
lines() click to toggle source
# File lib/soundcloud9000/views/splash.rb, line 48
def lines
  CONTENT.split("\n")
end
refresh() click to toggle source
Calls superclass method Soundcloud9000::UI::View#refresh
# File lib/soundcloud9000/views/splash.rb, line 61
def refresh
  super

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