add mouse binding
This commit is contained in:
parent
03053cd862
commit
8013cbad16
6
ui/ui.go
6
ui/ui.go
@ -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
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user