Archived
1
0
Fork 0
This repository has been archived on 2023-03-27. You can view files and clone it, but cannot push or open issues or pull requests.
cli-old/lib/widgets/logo.rb

35 lines
818 B
Ruby
Raw Normal View History

2017-07-22 09:44:43 -04:00
# frozen_string_literal: true
module Widgets
2017-07-22 11:37:22 -04:00
class Menu < Container
2017-07-22 09:44:43 -04:00
class Logo < Base
2017-07-22 10:17:17 -04:00
LOGO = [
' _____ ___ _ _ ___ _ _ ',
' |_ _/ _ \ \/ / _ \| \ | | ',
' | || | | \ / | | | \| | ',
' | || |_| / \ |_| | |\ | ',
' |_| \___/_/\_\___/|_| \_| ',
' ',
2017-07-22 10:40:50 -04:00
' Version 0.0.0 ',
' ',
2017-07-22 10:17:17 -04:00
].freeze
2017-07-22 09:44:43 -04:00
2017-07-22 10:17:17 -04:00
WIDTH = LOGO.first.length
HEIGHT = LOGO.length
2017-07-22 09:44:43 -04:00
2017-07-24 07:54:00 -04:00
def initialize(parent, x, y, _width, _height)
super parent, x, y, WIDTH, HEIGHT
2017-07-22 09:44:43 -04:00
end
def draw
2017-07-24 05:52:42 -04:00
Style.default.logo window do
2017-07-22 10:12:36 -04:00
LOGO.each_with_index do |s, index|
2017-07-22 10:31:38 -04:00
setpos 0, index
2017-07-22 14:46:50 -04:00
addstr s
2017-07-22 10:12:36 -04:00
end
2017-07-22 09:44:43 -04:00
end
end
end
end
end