From 639723c288d29e58105b71a51257d58ae8abe210 Mon Sep 17 00:00:00 2001 From: Roi Martin Date: Sat, 23 Jan 2016 17:18:30 +0100 Subject: [PATCH] Rename Gui.EnableMouse to Gui.Mouse --- _examples/mouse.go | 2 +- gui.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/_examples/mouse.go b/_examples/mouse.go index 7c96eed..36048a1 100644 --- a/_examples/mouse.go +++ b/_examples/mouse.go @@ -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 { diff --git a/gui.go b/gui.go index db37e18..a6cae96 100644 --- a/gui.go +++ b/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)