raylib-go
raylib-go copied to clipboard
raygui - control spinner returns value instead of bool when clicked
According to the 'original' C code for raygui, the Spinner control should behave like the value box. The value is a pointer to an int32 and when clicked it returns true. This way we can toggle the edit mode when clicked.
Currently it returns the value and there is no way to detect when a Spinner control has been clicked.
from: controls_test_suite.c
if (GuiSpinner((Rectangle){ 25, 135, 125, 30 }, NULL, &spinner001Value, 0, 100, spinnerEditMode)) spinnerEditMode = !spinnerEditMode;
if (GuiValueBox((Rectangle){ 25, 175, 125, 30 }, NULL, &valueBox002Value, 0, 100, valueBoxEditMode)) valueBoxEditMode = !valueBoxEditMode;