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

Remove common functionality from KeyboardWidget and into Base

Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
Chris Cummer
2020-12-13 05:36:46 -08:00
parent aae98e40e3
commit d6c8e08c2f
43 changed files with 92 additions and 66 deletions

View File

@@ -12,17 +12,18 @@ type WtfAppManager struct {
// NewAppManager creates and returns an instance of AppManager
func NewAppManager() WtfAppManager {
appMan := WtfAppManager{
WtfApps: []*WtfApp{},
selected: 0,
}
return appMan
}
// AddApp adds a WtfApp to the collection of apps that the AppManager manages.
// Add adds a WtfApp to the collection of apps that the AppManager manages.
// This app is then available for display onscreen.
func (appMan *WtfAppManager) AddApp(wtfApp *WtfApp) error {
func (appMan *WtfAppManager) Add(wtfApp *WtfApp) {
appMan.WtfApps = append(appMan.WtfApps, wtfApp)
return nil
}
// Current returns the currently-displaying instance of WtfApp