feat: add support for input box icons
This commit is contained in:
parent
4d2c7d8a8c
commit
92b1354d4d
2 changed files with 13 additions and 4 deletions
|
@ -70,6 +70,8 @@ pub fn Create(options: type) type {
|
|||
.inputbox = (try self.menu.add_header(try InputBox.create(*Self, self.allocator, self.menu.menu.parent, .{
|
||||
.ctx = self,
|
||||
.label = options.label,
|
||||
.padding = 2,
|
||||
.icon = if (@hasDecl(options, "icon")) options.icon else null,
|
||||
}))).dynamic_cast(InputBox.State(*Self)) orelse unreachable,
|
||||
.view_rows = get_view_rows(tui.screen()),
|
||||
.entries = std.ArrayList(Entry).init(allocator),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue