Class: Amun::UI::EchoArea
- Inherits:
-
Object
- Object
- Amun::UI::EchoArea
- Defined in:
- lib/amun/ui/echo_area.rb
Overview
a line that is rendered by default at the end on the screen takes one line height and extends to take the whole width of screen should be linked to *messages* memory buffer and display new messages in the buffer text
Instance Attribute Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ EchoArea
constructor
A new instance of EchoArea.
-
#render(window) ⇒ Object
render the echo area window.
- #trigger(event) ⇒ Object
Constructor Details
#initialize ⇒ EchoArea
Returns a new instance of EchoArea.
16 17 18 |
# File 'lib/amun/ui/echo_area.rb', line 16 def initialize @last_messages_size = 0 end |
Instance Attribute Details
#events ⇒ Object
12 13 14 |
# File 'lib/amun/ui/echo_area.rb', line 12 def events @events ||= EventManager.new end |
Instance Method Details
#render(window) ⇒ Object
render the echo area window
25 26 27 28 29 |
# File 'lib/amun/ui/echo_area.rb', line 25 def render(window) window.clear window << end |
#trigger(event) ⇒ Object
20 21 22 |
# File 'lib/amun/ui/echo_area.rb', line 20 def trigger(event) EventManager.join(event, events) end |