1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 06:10:06 -04:00

Change the definition of clicked_by (#4192)

This is a refactor on the way to add support for opening context menus
on touch screens via press-and-hold.

This PR changes what `InputState::button_clicked` does (it was ver badly
named before), and also changes `Response::clicked_by` to no longer be
true if clicking with keyboard (i.e. a widget has keyboard focus and the
user presses Space or Enter).
This commit is contained in:
Emil Ernerfeldt
2024-03-19 18:16:04 +01:00
committed by GitHub
parent 820fa3c43a
commit cd1ed73388
7 changed files with 62 additions and 67 deletions

View File

@@ -11,7 +11,7 @@ impl Eq for PanZoom {}
impl super::Demo for PanZoom {
fn name(&self) -> &'static str {
"🗖 Pan Zoom"
"🔍 Pan Zoom"
}
fn show(&mut self, ctx: &egui::Context, open: &mut bool) {