1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

Remove the need for every module to define a widget.ShowHelp keyboard control

This common functionality is moved up to KeyboardWidget. Modules now
include widget.InitializeCommonControls() instead.
This commit is contained in:
Chris Cummer
2019-08-23 21:11:05 -07:00
parent 5270501fac
commit 5337656c58
24 changed files with 57 additions and 25 deletions

View File

@@ -5,7 +5,8 @@ import (
)
func (widget *Widget) initializeKeyboardControls() {
widget.SetKeyboardChar("/", widget.ShowHelp, "Show/hide this help window")
widget.InitializeCommonControls()
widget.SetKeyboardChar("r", widget.Refresh, "Refresh widget")
widget.SetKeyboardChar("h", widget.prevProject, "Select previous project")
widget.SetKeyboardChar("l", widget.nextProject, "Select next project")