1
0
mirror of synced 2024-11-12 02:00:52 +01:00

fix: Hyperlink items disappearing inside of scrolling containers

This commit is contained in:
WerWolv 2023-12-27 02:14:38 +01:00
parent d7ba2e7171
commit 37d60411bb

View File

@ -181,8 +181,6 @@ namespace ImGuiExt {
bool Hyperlink(const char *label, const ImVec2 &size_arg, ImGuiButtonFlags flags) {
ImGuiWindow *window = GetCurrentWindow();
if (window->SkipItems)
return false;
ImGuiContext &g = *GImGui;
const ImGuiID id = window->GetID(label);
@ -192,8 +190,7 @@ namespace ImGuiExt {
ImVec2 size = CalcItemSize(size_arg, label_size.x, label_size.y);
const ImRect bb(pos, pos + size);
if (!ItemAdd(bb, id))
return false;
ItemAdd(bb, id);
if (g.LastItemData.InFlags & ImGuiItemFlags_ButtonRepeat)
flags |= ImGuiButtonFlags_Repeat;