feat: add palette for changing the current file type

This commit is contained in:
CJ van den Berg 2024-12-10 20:10:36 +01:00
parent c3021de372
commit 9fba9eba3c
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
5 changed files with 187 additions and 1 deletions

View file

@ -54,7 +54,7 @@ pub fn Create(options: type) type {
.modal = try ModalBackground.create(*Self, allocator, tui.current().mainview, .{ .ctx = self }),
.menu = try Menu.create(*Self, allocator, tui.current().mainview, .{
.ctx = self,
.on_render = on_render_menu,
.on_render = if (@hasDecl(options, "on_render_menu")) options.on_render_menu else on_render_menu,
.on_resize = on_resize_menu,
.on_scroll = EventHandler.bind(self, Self.on_scroll),
.on_click4 = mouse_click_button4,