Merge branch 'develop' into cyclehotkey2

develop
TaxiService 2023-05-02 08:22:10 +02:00 committed by GitHub
commit f181b50a30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

@ -836,7 +836,9 @@ function Scrollbar:update(top_elem, elems_per_page, num_elems)
end
local function scrollbar_do_drag(scrollbar)
local _,y = scrollbar.frame_body:localXY(dfhack.screen.getMousePos())
local x,y = dfhack.screen.getMousePos()
if not y then return end
x,y = scrollbar.frame_body:localXY(x, y)
local cur_pos = y - scrollbar.is_dragging
local max_top = scrollbar.num_elems - scrollbar.elems_per_page + 1
local max_pos = scrollbar_get_max_pos_and_height(scrollbar)