Class: Flumtter::Window::Popup

Inherits:
Base
  • Object
show all
Defined in:
lib/flumtter/app/core/windows/popup.rb

Direct Known Subclasses

Error, Success

Defined Under Namespace

Classes: Error, Success

Instance Method Summary collapse

Methods inherited from Base

#initialize

Methods included from Dispel::Util

#add_multiline_str, #addstr, #getstr

Constructor Details

This class inherits a constructor from Flumtter::Window::Base

Instance Method Details

#showObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/flumtter/app/core/windows/popup.rb', line 6

def show
  Dispel::Screen.open do |screen|
    Dispel::Window.open(@hight, @width, 0, 0) do |win|
      win.box(?|,?-,?*)
      win.setpos(win.cury+2, win.curx+1)
      win.addstr @title.title
      win.setpos(win.cury+1, 1)
      win.addstr "¯"*(@title.title.size+2)

      add_multiline_str(win, @body)

      win.getch
    end
  end
end