refactor: add tui.get_drag_source

This commit is contained in:
CJ van den Berg 2026-01-15 15:46:12 +01:00
parent 760d498f53
commit 58bd1fe12a
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -1786,6 +1786,11 @@ fn set_drag_source(self: *Self, drag_source: ?*Widget, btn: input.MouseType) voi
self.drag_button = btn;
}
pub fn get_drag_source() struct { ?*Widget, input.MouseType } {
const self = current();
return .{ self.drag_source, self.drag_button };
}
pub fn reset_drag_context() void {
const self = current();
self.drag_source = null;