Style fixes and added dontSignal to UIRadioGroup.
This commit is contained in:
parent
4ec5048730
commit
0b5654f870
|
@ -3,6 +3,7 @@ TextEdit < UITextEdit
|
|||
color: #272727
|
||||
size: 86 22
|
||||
text-offset: 0 4
|
||||
opacity: 1
|
||||
padding: 4
|
||||
image-source: /images/ui/textedit
|
||||
image-border: 1
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
SpinBox < TextEdit
|
||||
__class: UISpinBox
|
||||
text-align: left
|
||||
size: 86 20
|
||||
size: 86 22
|
||||
padding: 0
|
||||
padding-left: 2
|
||||
|
||||
Button
|
||||
id: up
|
||||
size: 10 10
|
||||
size: 11 11
|
||||
image-source: /images/ui/spinbox_up
|
||||
image-border: 1
|
||||
image-clip: 0 0 10 10
|
||||
|
@ -21,7 +21,7 @@ SpinBox < TextEdit
|
|||
|
||||
Button
|
||||
id: down
|
||||
size: 10 10
|
||||
size: 11 11
|
||||
image-source: /images/ui/spinbox_down
|
||||
image-border: 1
|
||||
image-clip: 0 0 10 10
|
||||
|
|
|
@ -28,7 +28,7 @@ function UIRadioGroup:removeWidget(widget)
|
|||
table.removevalue(self.widgets, widget)
|
||||
end
|
||||
|
||||
function UIRadioGroup:selectWidget(selectedWidget)
|
||||
function UIRadioGroup:selectWidget(selectedWidget, dontSignal)
|
||||
if selectedWidget == self.selectedWidget then return end
|
||||
|
||||
local previousSelectedWidget = self.selectedWidget
|
||||
|
@ -42,8 +42,10 @@ function UIRadioGroup:selectWidget(selectedWidget)
|
|||
selectedWidget:setChecked(true)
|
||||
end
|
||||
|
||||
if not dontSignal then
|
||||
signalcall(self.onSelectionChange, self, selectedWidget, previousSelectedWidget)
|
||||
end
|
||||
end
|
||||
|
||||
function UIRadioGroup:clearSelected()
|
||||
if not self.selectedWidget then return end
|
||||
|
|
Loading…
Reference in New Issue