Use base classes to match events
This commit is contained in:
parent
3417500900
commit
9c3ab90268
1 changed files with 2 additions and 8 deletions
|
@ -14,15 +14,9 @@ module Widgets
|
||||||
|
|
||||||
def trigger(event)
|
def trigger(event)
|
||||||
case event
|
case event
|
||||||
when Events::Panel::Up, Events::Panel::Down
|
when Events::Panel::Base
|
||||||
@list.trigger event
|
@list.trigger event
|
||||||
when Events::Text::Putc,
|
when Events::Text::Base
|
||||||
Events::Text::Left,
|
|
||||||
Events::Text::Right,
|
|
||||||
Events::Text::Home,
|
|
||||||
Events::Text::End,
|
|
||||||
Events::Text::Backspace,
|
|
||||||
Events::Text::Delete
|
|
||||||
@search.trigger event
|
@search.trigger event
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Reference in a new issue