feat: generate hover events during drag operations

This commit is contained in:
CJ van den Berg 2024-04-11 18:32:57 +02:00
parent 3a2d91de7b
commit 2416251fc3
2 changed files with 26 additions and 7 deletions

View file

@ -111,6 +111,7 @@ pub fn State(ctx_type: type) type {
}
fn call_click_handler(self: *Self, btn: u32) void {
if (!self.hover) return;
switch (btn) {
nc.key.BUTTON1 => self.opts.on_click(&self.opts.ctx, self),
nc.key.BUTTON2 => self.opts.on_click2(&self.opts.ctx, self),