mirror of
https://github.com/rivo/tview.git
synced 2025-04-30 13:48:50 +08:00
Merge pull request #567 from millerlogic/mouse-buttons-fix
Update mouse buttons for tcell v2
This commit is contained in:
commit
8d551670db
@ -446,9 +446,9 @@ func (a *Application) fireMouseActions(event *tcell.EventMouse) (consumed, isMou
|
|||||||
button tcell.ButtonMask
|
button tcell.ButtonMask
|
||||||
down, up, click, dclick MouseAction
|
down, up, click, dclick MouseAction
|
||||||
}{
|
}{
|
||||||
{tcell.Button1, MouseLeftDown, MouseLeftUp, MouseLeftClick, MouseLeftDoubleClick},
|
{tcell.ButtonPrimary, MouseLeftDown, MouseLeftUp, MouseLeftClick, MouseLeftDoubleClick},
|
||||||
{tcell.Button2, MouseMiddleDown, MouseMiddleUp, MouseMiddleClick, MouseMiddleDoubleClick},
|
{tcell.ButtonMiddle, MouseMiddleDown, MouseMiddleUp, MouseMiddleClick, MouseMiddleDoubleClick},
|
||||||
{tcell.Button3, MouseRightDown, MouseRightUp, MouseRightClick, MouseRightDoubleClick},
|
{tcell.ButtonSecondary, MouseRightDown, MouseRightUp, MouseRightClick, MouseRightDoubleClick},
|
||||||
} {
|
} {
|
||||||
if buttonChanges&buttonEvent.button != 0 {
|
if buttonChanges&buttonEvent.button != 0 {
|
||||||
if buttons&buttonEvent.button != 0 {
|
if buttons&buttonEvent.button != 0 {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user