Style fixes and added dontSignal to UIRadioGroup.

This commit is contained in:
BenDol 2014-07-13 07:38:11 +12:00
parent 4ec5048730
commit 0b5654f870
3 changed files with 8 additions and 5 deletions

View File

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

View File

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

View File

@ -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,7 +42,9 @@ function UIRadioGroup:selectWidget(selectedWidget)
selectedWidget:setChecked(true)
end
signalcall(self.onSelectionChange, self, selectedWidget, previousSelectedWidget)
if not dontSignal then
signalcall(self.onSelectionChange, self, selectedWidget, previousSelectedWidget)
end
end
function UIRadioGroup:clearSelected()