Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mods/game_bot/functions/ui_elements.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ UI.Container = function(callback, unique, parent, widget)

local oldItems = {}

local scrollToBottom = function()
local scrollbar = widget.scroll
if scrollbar and scrollbar.setValue and scrollbar.getMaximum then
scrollbar:setValue(scrollbar:getMaximum())
end
end

local updateItems = function()
local items = widget:getItems()

Expand Down Expand Up @@ -71,6 +78,7 @@ UI.Container = function(callback, unique, parent, widget)
for i, child in ipairs(widget.items:getChildren()) do
child.onItemChange = updateItems
end
scrollToBottom()
end

widget.getItems = function()
Expand Down