raygui: Spinner returns true if clicked #503
This commit is contained in:
parent
7e9246c069
commit
9a87dd6d60
1 changed files with 3 additions and 4 deletions
|
@ -548,8 +548,8 @@ func ComboBox(bounds rl.Rectangle, text string, active int32) int32 {
|
||||||
return int32(cactive)
|
return int32(cactive)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Spinner control, returns selected value
|
// Spinner control, sets value to the selected number and returns true when clicked.
|
||||||
func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) int32 {
|
func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue int, editMode bool) bool {
|
||||||
var cbounds C.struct_Rectangle
|
var cbounds C.struct_Rectangle
|
||||||
cbounds.x = C.float(bounds.X)
|
cbounds.x = C.float(bounds.X)
|
||||||
cbounds.y = C.float(bounds.Y)
|
cbounds.y = C.float(bounds.Y)
|
||||||
|
@ -573,8 +573,7 @@ func Spinner(bounds rl.Rectangle, text string, value *int32, minValue, maxValue
|
||||||
cmaxValue := C.int(maxValue)
|
cmaxValue := C.int(maxValue)
|
||||||
ceditMode := C.bool(editMode)
|
ceditMode := C.bool(editMode)
|
||||||
|
|
||||||
C.GuiSpinner(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode)
|
return C.GuiSpinner(cbounds, ctext, &cvalue, cminValue, cmaxValue, ceditMode) != 0
|
||||||
return int32(cvalue)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Slider control
|
// Slider control
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue