╭ changed ────────────╮ │src/ui/Auth/Login.zig│ ╰─────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────╮ │2 const builtin = @import("builtin"); │ │3 const evt = @import("../../event.zig");│ │4 const ui = @import("../../ui.zig"); │ │5 +const inp = @import("../input.zig"); │ │6 const xit = @import("xit"); │ │7 const rp = xit.repo; │ │8 const hash = xit.hash; │ ╰──────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────────╮ │162 if (current == button_index) { │ │163 switch (key) { │ │164 .mouse => |mouse| { │ │164 - if (mouse.action == .press and mouse.action.press == .left) { │ │165 - if (root_focus.children.get(child_id)) |entry| { │ │166 - const r = entry.rect; │ │167 - if (mouse.x >= r.x and mouse.y >= r.y and │ │168 - mouse.x < r.x + r.size.width and mouse.y < r.y + r.size.height)│ │169 - { │ │170 - try self.submit(allocator, root_focus); │ │171 - return; │ │172 - } │ │173 - } │ │165 + if (inp.leftClickOn(root_focus, child_id, mouse)) { │ │166 + try self.submit(allocator, root_focus); │ │167 + return; │ │168 } │ │169 }, │ │170 else => {}, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯