From bc25b2de926d54ebb33efe42ceadd2adf1c1659a Mon Sep 17 00:00:00 2001 From: Braiden Vasco Date: Sat, 22 Jul 2017 14:17:17 +0000 Subject: [PATCH] Fix logo bg --- lib/widgets/menu/logo.rb | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/widgets/menu/logo.rb b/lib/widgets/menu/logo.rb index efd8cc3..16c46a8 100644 --- a/lib/widgets/menu/logo.rb +++ b/lib/widgets/menu/logo.rb @@ -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