Archived
1
0
Fork 0

Fix logo bg

This commit is contained in:
Braiden Vasco 2017-07-22 14:17:17 +00:00
parent 56724de066
commit bc25b2de92

View file

@ -3,16 +3,17 @@
module Widgets
class Menu < Base
class Logo < Base
LOGO = <<~END.lines.map { |s| s.gsub(/\n$/, '') }
_____ ___ _ _ ___ _ _
|_ _/ _ \\ \\/ / _ \\| \\ | |
| || | | \\ / | | | \\| |
| || |_| / \\ |_| | |\\ |
|_| \\___/_/\\_\\___/|_| \\_|
END
LOGO = [
' _____ ___ _ _ ___ _ _ ',
' |_ _/ _ \ \/ / _ \| \ | | ',
' | || | | \ / | | | \| | ',
' | || |_| / \ |_| | |\ | ',
' |_| \___/_/\_\___/|_| \_| ',
' ',
].freeze
WIDTH = LOGO.map(&:length).max + 2
HEIGHT = LOGO.length + 1
WIDTH = LOGO.first.length
HEIGHT = LOGO.length
def initialize(x, y, _width, _height)
super x, y, WIDTH, HEIGHT
@ -22,7 +23,7 @@ module Widgets
Style.default.logo do
LOGO.each_with_index do |s, index|
Curses.setpos y + index, x
Curses.addstr " #{s}"
Curses.addstr s
end
end
end