Class: Intent::UI::Panel
- Inherits:
-
Object
- Object
- Intent::UI::Panel
- Defined in:
- lib/intent/ui/ttyui.rb
Instance Method Summary collapse
- #draw ⇒ Object
-
#initialize(x, y, width, height) ⇒ Panel
constructor
A new instance of Panel.
Constructor Details
#initialize(x, y, width, height) ⇒ Panel
Returns a new instance of Panel.
12 13 14 15 16 17 |
# File 'lib/intent/ui/ttyui.rb', line 12 def initialize(x, y, width, height) @x = x @y = y @width = width @height = height end |
Instance Method Details
#draw ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/intent/ui/ttyui.rb', line 19 def draw TTY::Box.frame( left: @x, top: @y, width: @width, height: @height, align: :center, border: :light, style: { fg: :white, border: { fg: :white, } } ) end |