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:
BeniS
2013-02-20 23:08:03 +13:00
parent b61094c053
commit 88c59afb8c
5 changed files with 53 additions and 2 deletions

View File

@@ -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 = ""

View File

@@ -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()