lib/gamebox/core/input_manager.rb
# unregisters a block to be called when matching events are pulled from the SDL queue.
# ie 
# input_manager.unregister_hook KeyPressed, :space, registered_block
# also see InputManager#clear_hooks for clearing many hooks
unregisters a block to be called when matching events are pulled from the SDL queue.
unregisters a block to be called when matching events are pulled from the SDL queue .
def unregister_hook(event_class, *event_ids, &block)
    event_class = :down if DOWN_EVENTS.include? event_class
    event_class = :up if UP_EVENTS.include? event_class
    @hooks[event_class] ||= {}
    for event_id in event_ids
      @hooks[event_class][event_id] ||= []
      @hooks[event_class][event_id].delete block if block_given?
    end
    if event_ids.empty?
      @hooks[event_class] ||= []
      @hooks[event_class].delete block if block_given?
    end
  end
def unregister_hook ( event_class , * event_ids , & block ) event_class = :down if DOWN_EVENTS . include? event_class event_class = :up if UP_EVENTS . include? event_class @hooks [ event_class ] ||= { } for event_id in event_ids @hooks [ event_class ] [ event_id ] ||= [ ] @hooks [ event_class ] [ event_id ] . delete block if block_given? end if event_ids . empty? @hooks [ event_class ] ||= [ ] @hooks [ event_class ] . delete block if block_given? end end
unregisters a block to be called when matching events are pulled from the SDL queue.
unregisters a block to be called when matching events are pulled from the SDL queue .
event_class
<not_specific>
event_ids
<not_specific>
block
<not_specific>