-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new optional parameter to dbg_text_input() to be able to modify the type of input (string, int, real) #2738
Comments
Just an FYI - you can type a direct value into an ImGUI slider by using CTRL+click within the slider - this will allow you to type the number in directly to get exact values. |
Yes thank you for mentioning that! This should definitely be mentioned in the manual as well. |
Feature added in 2024.2 - modified function so to limit to only integers you can use the following code.
NOTE: Hex and Binary numbers are handled for integers i.e. 0xcafebabe or 0b1010101 |
YoYoGames/GameMaker-Bugs#2738 * Updated the dbg_text_input function page with the new info * Added a copy-pastable, thoroughly explained second code example * Added a note to the Data Types page to refer to the typeof function
Verified parameter type added in Beta IDE v2024.200.0.461 Beta Runtime v2024.200.0.477 |
…to modify the type of input (string, int, real) YoYoGames/GameMaker-Bugs#2738 * Clarified the line that the text field accepts and converts hexadecimal and binary literal values
Is your feature request related to a problem?
Currently there seems to be no way to input a number to change a variable with directly with the debug functions. We can change them with dbg_slider_int(), but the slider will not let us pick an exact number in the middle if we need one (slider does not increase by 1's, seems to go up by sporadic numbers).
We also have dbg_drop_down(), but we would have to hard code values to pick from. There is also dbg_text_input(), which is close to what I want/need, but it only returns a string, with no option to convert it to a real before setting it to the variable.
The IMGUIGML extension, which Nomms IMGUI is inspired from, has an imguigml_input_int(), which allows us to input a value to set variables to. Something like this is what I'm hoping can be added.
Describe the solution you'd like
A dbg_real_input() function to be able to set variables to directly with real or integer values, not just strings.
Describe alternatives you've considered
Currently I use IMGUIGML, but I wanted to remake my debug menu using GM's new dbg functions to also have access to the graphs/logs available with the debug overlay, along with my own custom debug menu. This doesn't seem completely possible at this current time.
Additional context
Here is how this looks with IMGUIGML, and I can set a custom value of 2000000000 for gold, among other things.
The text was updated successfully, but these errors were encountered: