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

InputTextMultiline() and IsItemHovered() #1370

Closed
Flix01 opened this issue Oct 16, 2017 · 5 comments
Closed

InputTextMultiline() and IsItemHovered() #1370

Flix01 opened this issue Oct 16, 2017 · 5 comments
Labels

Comments

@Flix01
Copy link

Flix01 commented Oct 16, 2017

Hi.
I'm not sure if something's changed or if it's a bug, but it seems that IsItemHovered() doesn't work anymore with InputTextMultiline() (no tooltip shows up).
With single line input text everything seems to work.

static char bfr[128]="Hello!";
ImGui::InputTextMultiline("IsItemHovered() Test",bfr,128);
if (ImGui::IsItemHovered()) ImGui::SetTooltip("%s","Hovered!");
@ocornut ocornut added the bug label Oct 16, 2017
@ocornut
Copy link
Owner

ocornut commented Oct 16, 2017

Thanks, will look at it. Are you on Master or Nav branch?

@ocornut
Copy link
Owner

ocornut commented Oct 16, 2017

So, this broke with commit 344d48b but I think the commit is correct (aka it was incorrect to flatten child windows here). I'd just need to store the right info to make it work after EndChild(), which is what is happening there.

@Flix01
Copy link
Author

Flix01 commented Oct 16, 2017

Yes, that's probably the commit that caused the issue.
I'm on the Master branch.

@ocornut
Copy link
Owner

ocornut commented Oct 16, 2017

I don't have a satisfying solution just yet, so for now I have reverted that changes and added notes about it. So this is fixed here.

@Flix01
Copy link
Author

Flix01 commented Oct 16, 2017

Thanks.

ocornut added a commit that referenced this issue Mar 4, 2021
…dChild(), EndGroup() or widgets using either... (#3851, #1370)

...when the hovered location is located within a child window, e.g. InputTextMultiline().
This is intended to have no side effects, but brace yourself for the possible comeback..
This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
More or less should fix/revert c76f014 which was a revert of 344d48b
duddel added a commit to duddel/imgui that referenced this issue Mar 4, 2021
commit ee643b2
Author: ocornut <[email protected]>
Date:   Thu Mar 4 19:59:59 2021 +0100

    IsItemHovered(): fixed return value false positive when used after EndChild(), EndGroup() or widgets using either... (ocornut#3851, ocornut#1370)

    ...when the hovered location is located within a child window, e.g. InputTextMultiline().
    This is intended to have no side effects, but brace yourself for the possible comeback..
    This essentially makes IsItemHovered() not accept hover from child windows, but EndChild/EndGroup are forwarded.
    More or less should fix/revert c76f014 which was a revert of 344d48b

commit b53b8f5
Author: Rokas Kupstys <[email protected]>
Date:   Thu Mar 4 16:27:43 2021 +0200

    Demo: Use correct string formats on non-windows platforms.

    (amended)

commit 3e6dfd3
Author: ocornut <[email protected]>
Date:   Thu Mar 4 13:37:14 2021 +0100

    ImDrawList: AddImageRounded() compare texid from cmdheader as with other functions. + Made the ImGuiMemAllocFunc / ImGuiMemFreeFunc consistent with our other typedefs (ocornut#3836)

commit 8dd692c
Author: ocornut <[email protected]>
Date:   Thu Mar 4 11:03:40 2021 +0100

    Android: Amend backend and examples with minor consistency tweaks. (ocornut#3446)

commit fb85c03
Author: duddel <[email protected]>
Date:   Thu Mar 4 10:35:44 2021 +0100

    Add Android backend and example (ocornut#3446)

commit d8c88bd
Author: ocornut <[email protected]>
Date:   Thu Mar 4 09:52:00 2021 +0100

    Tables: Fixed unaligned accesses when using TableSetBgColor(ImGuiTableBgTarget_CellBg). (ocornut#3872)

    ImSpanAllocator: Support for alignment.

commit 1ddaff8
Author: ocornut <[email protected]>
Date:   Wed Mar 3 18:45:52 2021 +0100

    Demo: Tweak inputs display.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants