fix: implement String() method for MouseButton type
This commit is contained in:
parent
62e46fe66f
commit
a26ecc5e91
1 changed files with 5 additions and 0 deletions
5
mouse.go
5
mouse.go
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Reference in a new issue