Skip to content

Commit

Permalink
TextLink(), TextLinkOpenURL(): change mouse cursor to Hand shape when…
Browse files Browse the repository at this point in the history
… hovered. (#7885, #7660)
  • Loading branch information
ocornut committed Aug 13, 2024
1 parent 45e7f78 commit 29fadad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Other changes:
payload over an already open tree node would incorrectly select it. (#7850)
- MultiSelect+TreeNode: default open behavior is OpenOnDoubleClick + OpenOnArrow
when used in a multi-select context without any OpenOnXXX flags set. (#7850)
- TextLink(), TextLinkOpenURL(): change mouse cursor to Hand shape when hovered. (#7885, #7660)
- Backends: GLFW: added ImGui_ImplGlfw_Sleep() helper function because GLFW does not
provide a way to do a portable sleep. (#7844)
- Examples: GLFW (all), SDL2 (all), SDL3 (all), Win32+OpenGL3: rework examples main loop
Expand Down
3 changes: 3 additions & 0 deletions imgui_widgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,9 @@ bool ImGui::TextLink(const char* label)
bool pressed = ButtonBehavior(bb, id, &hovered, &held);
RenderNavHighlight(bb, id, ImGuiNavHighlightFlags_None);

if (hovered)
SetMouseCursor(ImGuiMouseCursor_Hand);

ImVec4 text_colf = g.Style.Colors[ImGuiCol_TextLink];
ImVec4 line_colf = text_colf;
{
Expand Down

0 comments on commit 29fadad

Please sign in to comment.