Class: Amun::Windows::EchoArea

Inherits:
Base show all
Defined in:
lib/amun/windows/echo_area.rb

Overview

a line that is rendered by default at the end on the screen takes the whole width of screen should be linked to *messages* memory buffer and display new messages in the buffer text

Instance Attribute Summary

Attributes inherited from Base

#size

Attributes inherited from Object

#events

Instance Method Summary collapse

Constructor Details

#initialize(size) ⇒ EchoArea

Returns a new instance of EchoArea.



11
12
13
14
# File 'lib/amun/windows/echo_area.rb', line 11

def initialize(size)
  super(size)
  @last_messages_size = 0
end

Instance Method Details

#renderObject



16
17
18
19
20
21
# File 'lib/amun/windows/echo_area.rb', line 16

def render
  curses_window.erase
  curses_window << message
  curses_window.refresh
  update_last_messages_size
end