DVUI

addChoiceLabel

Parameters

#
self:*SuggestionWidget
*SuggestionWidget
label_str:[]const u8
[]const u8

Source

Implementation

#
pub fn addChoiceLabel(self: *SuggestionWidget, label_str: []const u8) bool {
    var mi = self.addChoice();

    dvui.labelNoFmt(@src(), label_str, .{}, .{});

    var ret: bool = false;
    if (mi.activeRect()) |_| {
        self.close();
        ret = true;
    }

    mi.deinit();

    return ret;
}