ImGui bindings: fix optional strings#64
Merged
nmwsharp merged 3 commits intonmwsharp:imgui_bindings_cleanupfrom Jan 31, 2026
Merged
ImGui bindings: fix optional strings#64nmwsharp merged 3 commits intonmwsharp:imgui_bindings_cleanupfrom
nmwsharp merged 3 commits intonmwsharp:imgui_bindings_cleanupfrom
Conversation
merlinND
commented
Jan 7, 2026
| [](float fraction, const Vec2T& size_arg, std::string overlay) { | ||
| ImGui::ProgressBar(fraction, to_vec2(size_arg), overlay.empty() ? nullptr : overlay.c_str()); | ||
| [](float fraction, const Vec2T& size_arg, std::optional<std::string> overlay) { | ||
| ImGui::ProgressBar(fraction, to_vec2(size_arg), to_char_ptr(overlay)); |
Contributor
Author
There was a problem hiding this comment.
This might slightly change the previous behavior, please check whether this is okay for you.
Same goes for TextLinkOpenURL.
For the return value of `get_texture_size()`.
nmwsharp
added a commit
that referenced
this pull request
Feb 2, 2026
* change folder layout * WIP refactoring imgui enums * add missing enum bindings * regenerate and refactor imgui functs * WIP structs and continuing on other bindings * build and tests pass * fonts bindings * test reorganization * update dep * fix test discovery paths * add type sentinel file * generate type stubs with nanobind * fixes for tests, tests pass * finish implot bindings * changes for imgui update * unrelated: parallel builds * improve test args * update polyscope to latest [ci build] * update gitignore * bind new fonts callback [ci_build] * back to master ps * limits build jobs * WIP updating type annotations * more typing cleanup * ty typecheck passes * add type checking to actions workflow * linter is clean * types for options * fix window size tests * ImGui bindings: fix optional strings (#64) * ImGui: fix optional `const char *` arguments * ManagedBuffer: import missing type caster For the return value of `get_texture_size()`. --------- Co-authored-by: Nicholas Sharp <nmwsharp@gmail.com> * fix test script args * fix test command * change name to avoid keyword * update dep to latest * WIP fixing enums * update tests for view changes * 2nd attempt at enums * fix imgui style bindings * update dep to latest * add jobs limit for CI * add right gui pane bindings * formatting --------- Co-authored-by: Merlin Nimier-David <merlinND@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small fixes for PR #62.
See: https://nanobind.readthedocs.io/en/latest/functions.html#none-arguments, specifically: