addEventMouseButton
Add a mouse button event (like left button down/up).
This can be called outside begin/end. You should add all the events for a frame either before begin() or just after begin() and before calling normal dvui widgets. end() clears the event list.
Parameters
- self:*Self
- *Self
- b:dvui.enums.Button
- dvui.enums.Button
- action:Event.Mouse.Action
- Event.Mouse.Action
Source
Implementation
pub fn addEventMouseButton(self: *Self, b: dvui.enums.Button, action: Event.Mouse.Action) std.mem.Allocator.Error!bool {
return addEventPointer(self, .{ .button = b, .action = action });
}