feat: add mouse resizing of panel views

This commit is contained in:
CJ van den Berg 2024-08-13 19:38:35 +02:00
parent 95bf2ac9a7
commit 50d47a73f2
15 changed files with 138 additions and 65 deletions

View file

@ -14,13 +14,14 @@ const command = @import("../command.zig");
const ed = @import("../editor.zig");
const tui = @import("../tui.zig");
pub fn create(a: Allocator, parent: Plane) !Widget {
pub fn create(a: Allocator, parent: Plane, event_handler: ?Widget.EventHandler) !Widget {
return Button.create_widget(void, a, parent, .{
.ctx = {},
.label = tui.get_mode(),
.on_click = on_click,
.on_layout = layout,
.on_render = render,
.on_event = event_handler,
});
}