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 {
|
if err := keybindings(g); err != nil {
|
||||||
log.Panicln(err)
|
log.Panicln(err)
|
||||||
}
|
}
|
||||||
g.EnableMouse = true
|
g.Mouse = true
|
||||||
|
|
||||||
err = g.MainLoop()
|
err = g.MainLoop()
|
||||||
if err != nil && err != gocui.ErrQuit {
|
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.
|
// If ShowCursor is true then the cursor is enabled.
|
||||||
ShowCursor bool
|
ShowCursor bool
|
||||||
|
|
||||||
// If EnableMouse is true then mouse events will be enabled.
|
// If Mouse is true then mouse events will be enabled.
|
||||||
EnableMouse bool
|
Mouse bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewGui returns a new Gui object.
|
// NewGui returns a new Gui object.
|
||||||
|
@ -225,7 +225,7 @@ func (g *Gui) MainLoop() error {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
inputMode := termbox.InputAlt
|
inputMode := termbox.InputAlt
|
||||||
if g.EnableMouse == true {
|
if g.Mouse {
|
||||||
inputMode |= termbox.InputMouse
|
inputMode |= termbox.InputMouse
|
||||||
}
|
}
|
||||||
termbox.SetInputMode(inputMode)
|
termbox.SetInputMode(inputMode)
|
||||||
|
|
Loading…
Reference in New Issue