Skip to content
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

Support for unsigned, double and 64bit int types #320

Closed
kylawl opened this issue Sep 6, 2015 · 4 comments
Closed

Support for unsigned, double and 64bit int types #320

kylawl opened this issue Sep 6, 2015 · 4 comments

Comments

@kylawl
Copy link
Contributor

kylawl commented Sep 6, 2015

Right now everything eventually becomes the 32bit float editor. We'd love to also see uint64_t, int64_t, uint32_t, and double in there.

Thanks!

@ocornut
Copy link
Owner

ocornut commented Sep 6, 2015

Which widgets are you thinking about exactly?
Input, Drag, Slider, something else?
Inputs you can easily wrap them around yourself using InputText() Do you actually need all those types? Can't imagine someone wanting to use a slider that requires an unsigned int 32 when you can just cast the pointer to signed int and have a 2 billion range available.

@kylawl
Copy link
Contributor Author

kylawl commented Sep 6, 2015

Basically we have a pretty complete c++ reflection system and want to be able to inspect and modify all the data types for debugging. But you're right, for our usage it probably makes the most sense to just use InputText() and sort it out, obviously we don't need drag/sliders for this stuff.

@ocornut
Copy link
Owner

ocornut commented Sep 6, 2015

Good!
In theory it would be convenient to have all types available but I believe the use cases would be abnormally rare (e.g. using a Drag on an actual int64 value will all the range available, If you don't access all the range the function can be wrapped). Right now I don't have an easy way to implement that without messing up the code so I decided on skipping it.

InputFloat() / InputInt() have some extra features compared to what you'd typically do yourself with InputText()+scanf: buttons and arithmetic ops (you can type e.g. *100 in an InputFloat() box to multiply the value by 100). You should be able to replicate those features in your own versions if you really fancy them. Otherwise InputText()+scanf should work.

@ocornut ocornut closed this as completed Sep 6, 2015
ocornut added a commit that referenced this issue May 3, 2018
…putScalar(). Removed internal.h InputScalarEx() to InputScalar(). Removed cheap-relative-operators support in recently added U32 data path, since this is heading toward being legacy code. + Fixed InputDouble parsing code. (#1011, #320, #708)
ocornut added a commit that referenced this issue May 3, 2018
…tor and no absolute values so we will be able to manipulate double as well as 64-bit integers. (#1011, #708, #320)
ocornut added a commit that referenced this issue May 3, 2018
ocornut added a commit that referenced this issue May 3, 2018
…ScalarN(), removed InputFloatN(), InputInt(). Note that DragInt2/3/4 will %f format strings will currently be broken. (#320, #643, #708, #1011)
ocornut added a commit that referenced this issue May 3, 2018
ocornut added a commit that referenced this issue May 4, 2018
…h various ranges/limits. Note that Drag/Slider/Input currently fail if the format string doesn't preview the actual value. Will fix next. (#320, #643, #708, #1011)
@ocornut
Copy link
Owner

ocornut commented May 4, 2018

FYI, I have added functions in a branch to work with float, double, 32/64 bits, signed and unsigned (and in a proper lossless manner, as previously some functions didn't work great with big integers).
See #643 for details.

ocornut added a commit that referenced this issue Sep 11, 2018
…ed or with a power curve erroneously wrapped the value to one of the min/max edge. (#2024, #708, #320, #2075).
ocornut added a commit that referenced this issue Feb 27, 2019
…6 data types. We are reusing function instances for larger types to reduce code size. (#643, #320, #708, #1011)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants