Rename Gui.EnableMouse to Gui.Mouse

This commit is contained in:
Roi Martin 2016-01-23 17:18:30 +01:00
parent faa12e105a
commit 639723c288
2 changed files with 4 additions and 4 deletions

View File

@ -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
View File

@ -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)