Fix a few things

This commit is contained in:
Brian Buller 2019-03-06 07:38:48 -06:00
parent 5d95e080ef
commit cbfde8c8fb
4 changed files with 3 additions and 4 deletions

View File

@ -66,11 +66,7 @@ func (a *AppState) run(parms []string) int {
a.uiManager.AddScreen(&MainScreen{}) a.uiManager.AddScreen(&MainScreen{})
a.uiManager.AddScreen(&TaskScreen{}) a.uiManager.AddScreen(&TaskScreen{})
a.uiManager.AddScreen(&AboutScreen{}) a.uiManager.AddScreen(&AboutScreen{})
for k := range a.uiManager.GetScreens() {
fmt.Print("Screen:", k, "\n")
}
a.uiManager.SetDisplayScreen(MainScreenId)
mainBundle := termboxScreen.Bundle{} mainBundle := termboxScreen.Bundle{}
mainBundle.SetValue(MainBundleListKey, MainBundleListTodo) mainBundle.SetValue(MainBundleListKey, MainBundleListTodo)

View File

@ -62,6 +62,7 @@ func (screen *AboutScreen) ResizeScreen() { screen.Initialize(nil) }
func (screen *AboutScreen) HandleKeyEvent(event termbox.Event) int { func (screen *AboutScreen) HandleKeyEvent(event termbox.Event) int {
return MainScreenId return MainScreenId
} }
func (screen *AboutScreen) HandleNoneEvent(event termbox.Event) int { return AboutScreenId }
func (screen *AboutScreen) DrawScreen() { func (screen *AboutScreen) DrawScreen() {
width, height := termbox.Size() width, height := termbox.Size()

View File

@ -227,6 +227,7 @@ func (screen *MainScreen) HandleKeyEvent(event termbox.Event) int {
} }
return MainScreenId return MainScreenId
} }
func (screen *MainScreen) HandleNoneEvent(event termbox.Event) int { return MainScreenId }
func (screen *MainScreen) handleInputKeyEvent(event termbox.Event) int { func (screen *MainScreen) handleInputKeyEvent(event termbox.Event) int {
switch screen.inputField.GetID() { switch screen.inputField.GetID() {

View File

@ -62,6 +62,7 @@ func (screen *TaskScreen) HandleKeyEvent(event termbox.Event) int {
} }
return TaskScreenId return TaskScreenId
} }
func (screen *TaskScreen) HandleNoneEvent(event termbox.Event) int { return TaskScreenId }
func (screen *TaskScreen) DrawScreen() { func (screen *TaskScreen) DrawScreen() {
screen.drawHeader() screen.drawHeader()