add mouse binding

This commit is contained in:
Gustavo Chain 2020-02-13 19:13:39 +01:00
parent 03053cd862
commit 8013cbad16
No known key found for this signature in database
GPG Key ID: DA7C1746DC118A46

View File

@ -37,6 +37,8 @@ func New() (*UI, error) {
gui.SetManager(ui)
gui.SetKeybinding("", gocui.KeyCtrlC, gocui.ModNone, quit)
gui.SetKeybinding("", 'q', gocui.ModNone, quit)
gui.SetKeybinding("", gocui.MouseLeft, gocui.ModNone, ui.click)
gui.Mouse = true
return ui, nil
}
@ -252,3 +254,7 @@ func fmtSeconds(s int64) string {
}
return fmt.Sprintf("%d hours", s/3600)
}
func (ui *UI) click(g *gocui.Gui, v *gocui.View) error {
return nil
}