dropped
Parameters
- self:*SuggestionWidget
- *SuggestionWidget
Source
Implementation
pub fn dropped(self: *SuggestionWidget) bool {
if (self.drop != null) {
// protect against calling this multiple times
return true;
}
if (self.menu.submenus_activated) {
self.drop = dvui.floatingMenu(@src(), .{ .from = self.init_options.rs.r.toNatural() }, self.options);
if (dvui.firstFrame(self.drop.?.data().id)) {
// don't take focus away from text_entry when showing the suggestions
dvui.focusWidget(self.init_options.text_entry_id, null, null);
}
}
if (self.drop != null) {
return true;
}
return false;
}