mirror of https://github.com/jroimartin/gocui.git
Rename Gui.EnableMouse to Gui.Mouse
This commit is contained in:
parent
faa12e105a
commit
639723c288
|
@ -24,7 +24,7 @@ func main() {
|
|||
if err := keybindings(g); err != nil {
|
||||
log.Panicln(err)
|
||||
}
|
||||
g.EnableMouse = true
|
||||
g.Mouse = true
|
||||
|
||||
err = g.MainLoop()
|
||||
if err != nil && err != gocui.ErrQuit {
|
||||
|
|
6
gui.go
6
gui.go
|
@ -43,8 +43,8 @@ type Gui struct {
|
|||
// If ShowCursor is true then the cursor is enabled.
|
||||
ShowCursor bool
|
||||
|
||||
// If EnableMouse is true then mouse events will be enabled.
|
||||
EnableMouse bool
|
||||
// If Mouse is true then mouse events will be enabled.
|
||||
Mouse bool
|
||||
}
|
||||
|
||||
// NewGui returns a new Gui object.
|
||||
|
@ -225,7 +225,7 @@ func (g *Gui) MainLoop() error {
|
|||
}()
|
||||
|
||||
inputMode := termbox.InputAlt
|
||||
if g.EnableMouse == true {
|
||||
if g.Mouse {
|
||||
inputMode |= termbox.InputMouse
|
||||
}
|
||||
termbox.SetInputMode(inputMode)
|
||||
|
|
Loading…
Reference in New Issue