mirror of
https://github.com/edubart/otclient.git
synced 2025-10-15 03:54:54 +02:00
Added 'sell all' tooltip to show items you can sell
* Now 'sell all' button with enable/disable * Fixed display issue with 'sell all' button * Also changed spinbox button click
This commit is contained in:
@@ -138,6 +138,15 @@ function table.findbyfield(t, fieldname, fieldvalue)
|
||||
return nil
|
||||
end
|
||||
|
||||
function table.size(t)
|
||||
local size = 0
|
||||
for i, n in pairs(table) do
|
||||
size = size + 1
|
||||
end
|
||||
|
||||
return size
|
||||
end
|
||||
|
||||
function table.tostring(t)
|
||||
local maxn = #t
|
||||
local str = ""
|
||||
|
@@ -15,6 +15,11 @@ function UISpinBox.create()
|
||||
return spinbox
|
||||
end
|
||||
|
||||
function UISpinBox:onSetup()
|
||||
g_mouse.bindAutoPress(self:getChildById('up'), function() self:up() end, 300)
|
||||
g_mouse.bindAutoPress(self:getChildById('down'), function() self:down() end, 300)
|
||||
end
|
||||
|
||||
function UISpinBox:onMouseWheel(mousePos, direction)
|
||||
if direction == MouseWheelUp then
|
||||
self:up()
|
||||
|
Reference in New Issue
Block a user