mirror of https://github.com/jroimartin/gocui.git
Rename Gui.ShowCursor to Gui.Cursor for consistency
This commit is contained in:
parent
260872b0f7
commit
ea4d0466c4
|
@ -201,7 +201,7 @@ func main() {
|
|||
}
|
||||
g.SelBgColor = gocui.ColorGreen
|
||||
g.SelFgColor = gocui.ColorBlack
|
||||
g.ShowCursor = true
|
||||
g.Cursor = true
|
||||
|
||||
err = g.MainLoop()
|
||||
if err != nil && err != gocui.ErrQuit {
|
||||
|
|
|
@ -26,7 +26,7 @@ func main() {
|
|||
}
|
||||
g.SelBgColor = gocui.ColorGreen
|
||||
g.SelFgColor = gocui.ColorBlack
|
||||
g.ShowCursor = true
|
||||
g.Cursor = true
|
||||
g.Mouse = true
|
||||
|
||||
err = g.MainLoop()
|
||||
|
|
|
@ -25,7 +25,7 @@ func main() {
|
|||
if err := initKeybindings(g); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
g.ShowCursor = true
|
||||
g.Cursor = true
|
||||
|
||||
err := g.MainLoop()
|
||||
if err != nil && err != gocui.ErrQuit {
|
||||
|
|
6
gui.go
6
gui.go
|
@ -45,8 +45,8 @@ type Gui struct {
|
|||
// foreground colors of the selected line, when it is highlighted.
|
||||
SelBgColor, SelFgColor Attribute
|
||||
|
||||
// If ShowCursor is true then the cursor is enabled.
|
||||
ShowCursor bool
|
||||
// If Cursor is true then the cursor is enabled.
|
||||
Cursor bool
|
||||
|
||||
// If Mouse is true then mouse events will be enabled.
|
||||
Mouse bool
|
||||
|
@ -375,7 +375,7 @@ func (g *Gui) drawFrame(v *View) error {
|
|||
|
||||
// draw manages the cursor and calls the draw function of a view.
|
||||
func (g *Gui) draw(v *View) error {
|
||||
if g.ShowCursor {
|
||||
if g.Cursor {
|
||||
if v := g.currentView; v != nil {
|
||||
maxX, maxY := v.Size()
|
||||
cx, cy := v.cx, v.cy
|
||||
|
|
Loading…
Reference in New Issue