10 releases (6 major breaking)
6.0.0 | Mar 30, 2024 |
---|---|
5.0.0 | Feb 11, 2024 |
4.0.0 | Jan 18, 2024 |
3.0.0 | Nov 27, 2023 |
0.1.1 | Jul 19, 2023 |
#230 in GUI
258 downloads per month
Used in 2 crates
(via hydrate-editor)
17KB
265 lines
egui_autocomplete
An extension to the egui::TextEdit
that allows for a dropdown box with autocomplete to popup while typing.
You can select the suggestions with arrows keys + enter/tab or mouse clicks.
View web example here
To enable egui persistence, enable the serde
feature
lib.rs
:
Example
use egui_autocomplete::AutoCompleteTextEdit;
struct AutoCompleteExample {
// User entered text
text: String,
// A list of strings to search for completions
inputs: Vec<String>,
}
impl AutoCompleteExample {
fn update(&mut self, _ctx: &egui::Context, ui: &mut egui::Ui) {
ui.add(AutoCompleteTextEdit::new(
&mut self.text,
&self.inputs,
));
}
}
Dependencies
~7–27MB
~389K SLoC