Skip to content

Commit

Permalink
Fixed key triggers: new keyboard events use @modifiers, not @mods.
Browse files Browse the repository at this point in the history
  • Loading branch information
jacius committed Aug 3, 2008
1 parent cd1a888 commit 1f72933
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/rubygame/event_triggers.rb
Expand Up @@ -132,8 +132,8 @@ def initialize( key=:any, mods=:any )
def match?( event )
if event.kind_of?( Events::KeyPressed )
((@key == :any) or (event.key == @key)) and \
((@mods == :any) or (@mods == :none and event.mods == [])\
or (event.mods == @mods))
((@mods == :any) or (@mods == :none and event.modifiers == [])\
or (event.modifiers == @mods))
end
end
end
Expand All @@ -149,8 +149,8 @@ def initialize( key=:any, mods=:any )
def match?( event )
if event.kind_of?( Events::KeyReleased )
((@key == :any) or (event.key == @key)) and \
((@mods == :any) or (@mods == :none and event.mods == [])\
or (event.mods == @mods))
((@mods == :any) or (@mods == :none and event.modifiers == [])\
or (event.modifiers == @mods))
end
end
end
Expand Down

0 comments on commit 1f72933

Please sign in to comment.