Fix a few things
This commit is contained in:
parent
5d95e080ef
commit
cbfde8c8fb
@ -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)
|
||||||
|
|
||||||
|
@ -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()
|
||||||
|
@ -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() {
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user