Class: Ektoplayer::Controllers::Help

Inherits:
Controller show all
Defined in:
lib/ektoplayer/controllers/help.rb

Instance Method Summary collapse

Constructor Details

#initialize(view, view_operations) ⇒ Help

Returns a new instance of Help.



8
9
10
11
12
13
14
15
16
17
# File 'lib/ektoplayer/controllers/help.rb', line 8

def initialize(view, view_operations)
   super(view)
   register = view_operations.with_register('help.')
   %w(up down page_up page_down top bottom).
      each { |op| register.(op, &view.method(op)) }

   # TODO: mouse?
   view.mouse.on(65536)   { view.page_up   }
   view.mouse.on(2097152) { view.page_down }
end