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