diff --git a/scripts/uosc_shared/elements/Menu.lua b/scripts/uosc_shared/elements/Menu.lua index 733b75a..0d08ea7 100644 --- a/scripts/uosc_shared/elements/Menu.lua +++ b/scripts/uosc_shared/elements/Menu.lua @@ -706,7 +706,7 @@ function Menu:render() ---@param menu MenuStack ---@param x number ---@param pos number Horizontal position index. 0 = current menu, <0 parent menus, >1 submenu. - function draw_menu(menu, x, pos) + local function draw_menu(menu, x, pos) local is_current, is_parent, is_submenu = pos == 0, pos < 0, pos > 0 local menu_opacity = pos == 0 and opacity or opacity * (options.menu_parent_opacity ^ math.abs(pos)) local ax, ay, bx, by = x, menu.top, x + menu.width, menu.top + menu.height diff --git a/scripts/uosc_shared/lib/utils.lua b/scripts/uosc_shared/lib/utils.lua index 4eecddc..f112f68 100644 --- a/scripts/uosc_shared/lib/utils.lua +++ b/scripts/uosc_shared/lib/utils.lua @@ -155,7 +155,7 @@ function get_ray_to_rectangle_distance(ax, ay, bx, by, rect) local closest = nil - function updateDistance(distance) + local function updateDistance(distance) if distance and (not closest or distance < closest) then closest = distance end end