mirror of
https://github.com/emilk/egui.git
synced 2026-08-31 22:00:03 -04:00
Improve misc documentation
Closes https://github.com/emilk/egui/issues/229
This commit is contained in:
@@ -128,8 +128,8 @@ impl Widgets {
|
||||
ui.horizontal(|ui| {
|
||||
ui.label("Single line text input:");
|
||||
let response = ui.text_edit_singleline(&mut self.single_line_text_input);
|
||||
if response.lost_focus() {
|
||||
// The user pressed enter.
|
||||
if response.lost_focus() && ui.input().key_pressed(egui::Key::Enter) {
|
||||
// …
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user