Method: MenuWindow#draw_menu

Defined in:
lib/menu_window.rb

#draw_menu(items = @page_content) ⇒ Object

Draws the actual menu on the screen, with appropriate color highlighting The color of the highlighting is determined by the model. The item should have a :color attribute that returns the appropriate color as a symbol, which will be looked up on the Curses::Color table.



110
111
112
113
114
115
116
117
# File 'lib/menu_window.rb', line 110

def draw_menu(items=@page_content)
  @window.setpos(0, 0)
  items.each do |x|
    draw_line(x[:text], x[:item])
  end
  draw_arrow
  @window.refresh
end