╭ changed ─────────────╮ │src/ui/Auth/Logout.zig│ ╰──────────────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭───────────────────────────────────────╮ │1 const std = @import("std"); │ │2 const ui = @import("../../ui.zig"); │ │3 +const inp = @import("../input.zig");│ │4 const xit = @import("xit"); │ │5 const xitui = xit.xitui; │ │6 const wgt = xitui.widget; │ ╰───────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────────────────────────────────╮ │ 90 return; │ │ 91 }, │ │ 92 .mouse => |mouse| { │ │ 92 - if (mouse.action == .press and mouse.action.press == .left) { │ │ 93 - if (root_focus.children.get(self.button_id)) |entry| { │ │ 94 - const r = entry.rect; │ │ 95 - if (mouse.x >= r.x and mouse.y >= r.y and │ │ 96 - mouse.x < r.x + r.size.width and mouse.y < r.y + r.size.height)│ │ 97 - { │ │ 98 - try self.logout(root_focus); │ │ 99 - return; │ │100 - } │ │101 - } │ │ 93 + if (inp.leftClickOn(root_focus, self.button_id, mouse)) { │ │ 94 + try self.logout(root_focus); │ │ 95 + return; │ │ 96 } │ │ 97 }, │ │ 98 else => {}, │ ╰────────────────────────────────────────────────────────────────────────────────────────────────╯