let resp = panel_ui.add(egui::TextEdit::singleline(&mut g_config.new_profile_name));
println!("ch : {}", resp.changed());
Only deleting characters triggers changed() with the backspace.
After looking around my code, I suspected that this was because ggez was the one detecting the inputs ; and a quick look through your examples confirmed my suspicions, as I found the text_input_event() example that worked like a charm by adding it to the EventHandler and giving back the characters to gui.
Considering this is very specific to the interaction between egui and ggez, it might be worth to add this into the Readme example ? It feels a little counterintuitive that the inputs would only partially work, and even if the solution would be found eventually, I initially spent a little while thinking I was dealing with either a broken part of the library, or that it was my implementation of the UI that was wrong, when it was in fact related to ggez and not to egui.
When trying to implement TextEdit :
Only deleting characters triggers changed() with the backspace.
After looking around my code, I suspected that this was because ggez was the one detecting the inputs ; and a quick look through your examples confirmed my suspicions, as I found the text_input_event() example that worked like a charm by adding it to the EventHandler and giving back the characters to gui.
Considering this is very specific to the interaction between egui and ggez, it might be worth to add this into the Readme example ? It feels a little counterintuitive that the inputs would only partially work, and even if the solution would be found eventually, I initially spent a little while thinking I was dealing with either a broken part of the library, or that it was my implementation of the UI that was wrong, when it was in fact related to ggez and not to egui.