Closed questor closed 7 years ago
it's even a bit trickier, because internally it's converted to a float value, so you have to use "%f" also for ints in fieldinfo::render (unsigned and signed). so proper patch would be so use always "%f" at the beginning of the render function and remove the patching of the format character (because it's always "%f" now).
You're right: I can reproduce the bug. Basically int fields (and probably unsigned int fields) simply make the program crash.
I'll see what's the best way to fix it.
P.S. As you can see, very few people are using this addon branch, and everything that's not covered in the test demos could break something. That's why user feedback is so important. Thanks for your report!
Should be fixed now. Could you please check?
Initially I wanted to allow precision for ints/unsigned ints as leading zeros, but now I simply ignore the precision argument (tried with digits before the dot with no avail).
You were right, ImGui internally uses float sliders/draggers for float, double, int and unsigned values: so the precision string must always be for floats. However the precision string in the node graph editor is also used for string and custom values, so I couldn't just use "%f" for everything.
Due to recent changes in the ImGui tooltip style handling, now tooltips in the Node Graph Editor look worse (not sure why, and how to fix them...) [UPDATE: it should be fixed now]
yes, works! thanks for the fix!
Thanks for your feedback. Glad it worked :smiley: !
Hi, thanks for your addons, they're really useful. I think I found an bug with the nodegrapheditor: when I add a int-field to a node during rendering in fieldInfo::render the precisionString is initialized with "%s" and the offset stored to the precisionLastCharIndex. For doubles, floats and so on this is changed accordingly, but not for signed/unsigned ints (it's commented out) which should be uncommented. with this fix my crash is gone.