ImGui.NET icon indicating copy to clipboard operation
ImGui.NET copied to clipboard

Quirks with ImGui.NET

Open Hi-ImKyle opened this issue 6 years ago • 4 comments

So I've found 2 quirks so far that I can't seem to avoid. So here they are. Hopefully someone has a solution to one of them. If not it's no big deal, but I would like to possibly see these fixed as I don't think they are related to ImGui on it's own but the wrapper.

First one is ImGui.InputText(), if there is text present and you select text as you would to say copy it, then proceed to delete the selected text, the byte buffer doesn't update entirely but the visual string does in the widget itself. Causing it to mess up a few things of mine that would benefit from this normal day to day action. Here is a screenshot of this happening

Second one is that most widgets that can take null in the text param in C++, always result in errors with the .NET library. There are many cases where I'd like things to be neat and not have unnecessary gaps between my buttons and text inputs etc. Not a big concern but might be something to look at?

By no means take this as me saying this is 100% ImGui.NET's fault as I'm in no position to figure out whether or not it is as I have no C++ knowledge to test either of these in a standard imgui environment.

Hi-ImKyle avatar Apr 29 '19 16:04 Hi-ImKyle

Sorry for the delay on this. I'll need to carve out some time to look at this specifically, and it would help if you could give some minimal code snippets that repro the issue. Both sound like they are related to the auto-generated marshalling code. The null string problem is likely very simple to fix, but the other may be trickier.

mellinoe avatar May 09 '19 05:05 mellinoe

Interestingly enough, I can't actually reproduce the text one anymore. Not sure why it's all of a sudden "all fine", though If I encounter it again, I will be sure to put it here and reopen this issue if this ever gets closed due to either of the quirks being fixed. If you can fix the null string one that would be great!

Hi-ImKyle avatar May 10 '19 20:05 Hi-ImKyle

@Hi-ImKyle @se5a I'm not able to find any functions that actually accept nullptr without crashing. ImGui.NET does correctly marshal a null string as a null pointer. Are there particular functions that you except a null string to work for?

mellinoe avatar Jul 11 '19 03:07 mellinoe

ImGui.Text(), but it's no biggy if its a problem, I can work around it, mostly it was just something that worked in a previous version.

se5a avatar Jul 11 '19 03:07 se5a