Spinbox changes
This commit is contained in:
parent
9c497f72f9
commit
fe6f6c2d20
|
@ -1,14 +1,6 @@
|
||||||
SpinBox < UISpinBox
|
SpinBox < TextEdit
|
||||||
font: verdana-11px-antialised
|
__class: UISpinBox
|
||||||
color: #aaaaaa
|
|
||||||
size: 86 20
|
size: 86 20
|
||||||
text-offset: 0 3
|
|
||||||
text-margin: 3
|
|
||||||
image-source: /images/textedit.png
|
|
||||||
image-border: 1
|
|
||||||
|
|
||||||
$disabled:
|
|
||||||
color: #aaaaaa88
|
|
||||||
|
|
||||||
Button
|
Button
|
||||||
id: up
|
id: up
|
||||||
|
|
|
@ -93,6 +93,16 @@ function UISpinBox:setValue(value)
|
||||||
self:setText(value)
|
self:setText(value)
|
||||||
end
|
end
|
||||||
self.value = value
|
self.value = value
|
||||||
|
|
||||||
|
local upButton = self:getChildById('up')
|
||||||
|
local downButton = self:getChildById('down')
|
||||||
|
if upButton then
|
||||||
|
upButton:setEnabled(self.maximum ~= self.minimum and self.value ~= self.maximum)
|
||||||
|
end
|
||||||
|
if downButton then
|
||||||
|
downButton:setEnabled(self.maximum ~= self.minimum and self.value ~= self.minimum)
|
||||||
|
end
|
||||||
|
|
||||||
signalcall(self.onValueChange, self, value)
|
signalcall(self.onValueChange, self, value)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue