fix: implement String() method for MouseButton type

This commit is contained in:
Ayman Bagabas 2024-09-16 15:54:35 -04:00
parent 62e46fe66f
commit a26ecc5e91
No known key found for this signature in database
GPG key ID: C8D51D2157C919AC

View file

@ -41,6 +41,11 @@ const (
MouseExtra2
)
// String returns a string representation of the mouse button.
func (b MouseButton) String() string {
return mouseButtons[b]
}
var mouseButtons = map[MouseButton]string{
MouseNone: "none",
MouseLeft: "left",