Skip to content

Multiple ID Error on Button Behavior #8030

@Zaryob

Description

@Zaryob

Version/Branch of Dear ImGui:

Branch: docking, Commit: 7937732

Back-ends:

imgui_impl_opengl3.cpp

Compiler, OS:

macOS + Clang 12, GCC, Windows + MSVC

Full config/build information:

No response

Details:

My Issue/Question:

Hi,

I was getting the click behavior using two ButtonBehavior(), one left click (with ImGuiButtonFlags_MouseButtonLeft flag) and one right click (with ImGuiButtonFlags_MouseButtonRight flag).

bool mouseClicked = ImGui::ButtonBehavior(ImRect(fftAreaMin, wfMax), GetID("WaterfallID"), &mouseHovered, &mouseHeld,
                                                  ImGuiButtonFlags_MouseButtonLeft | ImGuiButtonFlags_PressedOnClick);

        bool mouseRClicked = ImGui::ButtonBehavior(ImRect(fftAreaMin, wfMax), GetID("WaterfallID"), &mouseHovered, &mouseHeld,
                                                  ImGuiButtonFlags_MouseButtonRight | ImGuiButtonFlags_PressedOnClick);

However, I get the following image with the io.ConfigDebugDetectIdConflicts added since commit number d1ea03b.
Screenshot 2024-09-30 at 20 31 12

Here I have a basic situation and two questions.

I think the io.ConfigDebugDetectIdConflicts parameter is not implemented because it is still in development. Therefore I cannot close this error ("Unless I patch it manually"). Will it be added???

Secondly, I use two ButtonBehaviour's to achieve this behavior. I tried different ways:

  • When I assigned different IDs with GetID, right click did not work
  • I defined left click and right click simultaneously and then used IsMouseClicked to detect whether it is right or left, but it did not work)

So, how can I encourage with this issue?

Screenshots/Video:

No response

Minimal, Complete and Verifiable Example code:

It is fork of SDRPlusPlus of AlexandreRouma,

Code is on https://github.com/Zaryob/SDRPlusPlus

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions