AllenDang / giu

Cross platform rapid GUI framework for golang based on Dear ImGui.
MIT License
2.26k stars 131 forks source link

[Feature Request] Support other mouse buttons #818

Open MisustinIvan opened 2 months ago

MisustinIvan commented 2 months ago

Related problem

No response

Your request

Currently there is only left, right and middle mouse button. It would be nice to have support for the other buttons.

Alternative solution

No response

Additional context

No response

MisustinIvan commented 2 months ago

If someone points me in the right direction, I could work on this.

gucio321 commented 2 months ago

I've just checked and it seems that Dear ImGui does not support other mouse buttons...

from cimgui_enums.go:

// Identify a mouse button.
// Those values are guaranteed to be stable and we frequently use 0/1 directly. Named enums provided for convenience.
// original name: ImGuiMouseButton_
type MouseButton int32

const (
        MouseButtonLeft   MouseButton = 0
        MouseButtonRight  MouseButton = 1
        MouseButtonMiddle MouseButton = 2
        MouseButtonCOUNT  MouseButton = 5
)

Maybe, according to comment, other buttons will just have greater numbers?

tbh, first of all you'd need to check in Dear ImGui's code first