|
|
@ -591,12 +591,24 @@ function moveStackableItem(item, toPos)
|
|
|
|
spinbox:setValue(0)
|
|
|
|
spinbox:setValue(0)
|
|
|
|
spinbox:hideButtons()
|
|
|
|
spinbox:hideButtons()
|
|
|
|
spinbox:focus()
|
|
|
|
spinbox:focus()
|
|
|
|
|
|
|
|
spinbox.firstEdit = true
|
|
|
|
|
|
|
|
|
|
|
|
local spinBoxValueChange = function(self, value)
|
|
|
|
local spinBoxValueChange = function(self, value)
|
|
|
|
scrollbar:setValue(value)
|
|
|
|
scrollbar:setValue(value)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
spinbox.onValueChange = spinBoxValueChange
|
|
|
|
spinbox.onValueChange = spinBoxValueChange
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
local check = function()
|
|
|
|
|
|
|
|
if spinbox.firstEdit then
|
|
|
|
|
|
|
|
spinbox:setValue(spinbox:getMaximum())
|
|
|
|
|
|
|
|
spinbox.firstEdit = false
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
g_keyboard.bindKeyPress("Up", function() check() spinbox:up() end, spinbox)
|
|
|
|
|
|
|
|
g_keyboard.bindKeyPress("Down", function() check() spinbox:down() end, spinbox)
|
|
|
|
|
|
|
|
g_keyboard.bindKeyPress("PageUp", function() check() spinbox:setValue(spinbox:getValue()+10) end, spinbox)
|
|
|
|
|
|
|
|
g_keyboard.bindKeyPress("PageDown", function() check() spinbox:setValue(spinbox:getValue()-10) end, spinbox)
|
|
|
|
|
|
|
|
|
|
|
|
scrollbar.onValueChange = function(self, value)
|
|
|
|
scrollbar.onValueChange = function(self, value)
|
|
|
|
itembox:setItemCount(value)
|
|
|
|
itembox:setItemCount(value)
|
|
|
|
spinbox.onValueChange = nil
|
|
|
|
spinbox.onValueChange = nil
|
|
|
|