mirror of https://github.com/encounter/objdiff.git
Add space as alternative to enter hotkey
This is for consistency with egui's builtint enter/space hotkey for interacting with the focused widget.
This commit is contained in:
parent
0143046f3f
commit
4616058103
|
@ -8,7 +8,11 @@ pub fn enter_pressed(ctx: &Context) -> bool {
|
||||||
if any_widget_focused(ctx) {
|
if any_widget_focused(ctx) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ctx.input_mut(|i| i.key_pressed(Key::Enter) || i.pointer.button_pressed(PointerButton::Extra2))
|
ctx.input_mut(|i| {
|
||||||
|
i.key_pressed(Key::Enter)
|
||||||
|
|| i.key_pressed(Key::Space)
|
||||||
|
|| i.pointer.button_pressed(PointerButton::Extra2)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn back_pressed(ctx: &Context) -> bool {
|
pub fn back_pressed(ctx: &Context) -> bool {
|
||||||
|
|
Loading…
Reference in New Issue