summaryrefslogtreecommitdiff
path: root/include/raygui.h
diff options
context:
space:
mode:
authorjussi2024-09-10 12:53:20 +0300
committerjussi2024-09-10 12:53:20 +0300
commitcd6471d339c394a37a1d46119818e0cabdcf5b42 (patch)
tree501d87d701cbc8ecba46498b876c85a6e020fa0d /include/raygui.h
parent415f3b6c019c62ddb065d6d861732531ac7385c2 (diff)
downloadreilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.gz
reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.tar.bz2
reilua-enhanced-cd6471d339c394a37a1d46119818e0cabdcf5b42.zip
rlSetVertexAttribute takes pointer as Buffer.
Diffstat (limited to 'include/raygui.h')
-rw-r--r--include/raygui.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/raygui.h b/include/raygui.h
index 2d3a4ce..5c7ac49 100644
--- a/include/raygui.h
+++ b/include/raygui.h
@@ -2875,6 +2875,23 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in
keyCount++;
valueHasChanged = true;
}
+ else if ( key == 45 ) {
+ if ( 0 < strtol( textValue, NULL, 10 ) ) {
+ keyCount++;
+ for ( int i = keyCount; 0 < i; i-- ) {
+ textValue[i] = textValue[i-1];
+ }
+ textValue[0] = 45;
+ }
+ else {
+ for ( int i = 0; i < keyCount; i++ ) {
+ textValue[i] = textValue[i+1];
+ }
+ textValue[ keyCount ] = '\0';
+ keyCount--;
+ }
+ valueHasChanged = true;
+ }
}
}
@@ -2889,7 +2906,8 @@ int GuiValueBox(Rectangle bounds, const char *text, int *value, int minValue, in
}
}
- if (valueHasChanged) *value = TextToInteger(textValue);
+ // if (valueHasChanged) *value = TextToInteger(textValue);
+ if (valueHasChanged) *value = strtol( textValue, NULL, 10 );
// NOTE: We are not clamp values until user input finishes
//if (*value > maxValue) *value = maxValue;