Update NumberInput to use new TextInput methods
This commit is contained in:
parent
2b354979aa
commit
82cf822602
@ -75,13 +75,13 @@ func (this *NumberInput) Dot () text.Dot {
|
|||||||
|
|
||||||
// Value returns the value of the input.
|
// Value returns the value of the input.
|
||||||
func (this *NumberInput) Value () float64 {
|
func (this *NumberInput) Value () float64 {
|
||||||
value, _ := strconv.ParseFloat(this.input.Text(), 64)
|
value, _ := strconv.ParseFloat(this.input.Value(), 64)
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetValue sets the value of the input.
|
// SetValue sets the value of the input.
|
||||||
func (this *NumberInput) SetValue (value float64) {
|
func (this *NumberInput) SetValue (value float64) {
|
||||||
this.input.SetText(strconv.FormatFloat(value, 'g', -1, 64))
|
this.input.SetValue(strconv.FormatFloat(value, 'g', -1, 64))
|
||||||
}
|
}
|
||||||
|
|
||||||
// OnValueChange specifies a function to be called when the user edits the input
|
// OnValueChange specifies a function to be called when the user edits the input
|
||||||
|
Loading…
Reference in New Issue
Block a user