Skip to content

Commit

Permalink
feat: scroll to new position after moving item in menu (#552)
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph-heinrich authored May 5, 2023
1 parent 3369454 commit 5e2c930
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/uosc_shared/elements/Menu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,7 @@ function Menu:move_selected_item_to(index)
if callback and from and from ~= index and index >= 1 and index <= #self.current.items then
callback(from, index, self.current.submenu_path)
self.current.selected_index = index
request_render()
self:set_scroll_by((index - from) * self.scroll_step)
end
end

Expand Down

0 comments on commit 5e2c930

Please sign in to comment.