mirror of
https://github.com/OTCv8/otclientv8.git
synced 2025-10-19 06:03:27 +02:00
Version 2.2 - retro layout + bug fixes
This commit is contained in:
@@ -33,7 +33,7 @@ function init()
|
||||
|
||||
initCallbacks()
|
||||
|
||||
botButton = modules.client_topmenu.addRightGameToggleButton('botButton', tr('Bot'), '/images/topbuttons/bot', toggle)
|
||||
botButton = modules.client_topmenu.addRightGameToggleButton('botButton', tr('Bot'), '/images/topbuttons/bot', toggle, false, 99999)
|
||||
botButton:setOn(false)
|
||||
botButton:hide()
|
||||
|
||||
|
@@ -17,11 +17,9 @@ UI.Container = function(callback, unique, parent)
|
||||
|
||||
local updateItems = function()
|
||||
local items = widget:getItems()
|
||||
widget:setItems(items)
|
||||
|
||||
|
||||
-- callback part
|
||||
if not callback then return end
|
||||
local somethingNew = false
|
||||
local somethingNew = (#items ~= #oldItems)
|
||||
for i, item in ipairs(items) do
|
||||
if type(oldItems[i]) ~= "table" then
|
||||
somethingNew = true
|
||||
@@ -32,10 +30,13 @@ UI.Container = function(callback, unique, parent)
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
if somethingNew then
|
||||
oldItems = items
|
||||
callback(items)
|
||||
end
|
||||
|
||||
widget:setItems(items)
|
||||
end
|
||||
|
||||
widget.setItems = function(self, items)
|
||||
|
@@ -42,6 +42,7 @@ BotSeparator < HorizontalSeparator
|
||||
BotSmallScrollBar < SmallScrollBar
|
||||
|
||||
BotPanel < Panel
|
||||
margin-top: 1
|
||||
ScrollablePanel
|
||||
id: content
|
||||
anchors.fill: parent
|
||||
|
Reference in New Issue
Block a user