UnrealImGui icon indicating copy to clipboard operation
UnrealImGui copied to clipboard

Various Fixes

Open JordanSchlick opened this issue 2 years ago • 4 comments

Added imgui std::string lib Fixed resetting input on release Fixed Linux compilation errors Updated for unreal 5.2 Improved canvas viewport sizing

This code has been tested in OpenStorm

JordanSchlick avatar May 18 '23 03:05 JordanSchlick

Will pull this into our repo and test these changes on Monday.

WiggleWizard avatar Jun 01 '23 17:06 WiggleWizard

If you do, I would suggest @JordanSchlick update the strncpy fix to use FCStringAnsi::Strncpy to ensure maximum portability (and that you try to use those utilities where possible ^^).

I also found the ResetInput stuff to be a bit unnecessary, and a more concise fix would be updating SImGuiWidget::UpdateInputState to call the following code when returning focus (which is more inline with what the rest of the code is doing there - I think the fact it didn't do this already was an oversight):

InputHandler->OnKeyboardInputDisabled();
InputHandler->OnGamepadInputDisabled();
InputHandler->OnMouseInputDisabled();

Otherwise the rest of this stuff is great, particularly the viewport fixes, though I didn't get a chance to test the other two settings for CanvasSizeType - but I think the changes that were reverted via this PR were the main culprit with issues there anyways. So I think it's more correct in general now. 🙂

Also I apologize for dropping in out of nowhere on this issue; I was trying to find a fork that's currently being maintained to upstream to and came across this one. So I wanted to drop in and leave a quick code review on this PR since this is the fork we'll end up using, and these changes include a number of nice fixes.

SK83RJOSH avatar Jun 01 '23 18:06 SK83RJOSH

Thanks for the info. I've been meaning to update this with our studio's changes but we've been really busy...hopefully next week I will have enough down time on the programming side that I can actually update this repo with the much needed pushes.

WiggleWizard avatar Jun 01 '23 20:06 WiggleWizard

I implemented and tested the suggested changes involving InputHandler and Strncpy.

JordanSchlick avatar Jun 02 '23 17:06 JordanSchlick