Modifying tasks works

This commit is contained in:
2019-03-14 10:29:33 -05:00
parent cbfde8c8fb
commit 7abfa8f3cd
7 changed files with 399 additions and 91 deletions
+8 -3
View File
@@ -11,6 +11,13 @@ import (
termbox "github.com/nsf/termbox-go"
)
const (
ScreenIdMain = iota
ScreenIdTask
ScreenIdAbout
ScreenIdExit
)
type AppState struct {
Name string
Version int
@@ -42,8 +49,6 @@ const (
TitleBg = termbox.ColorBlue
CursorFg = termbox.ColorBlack
CursorBg = termbox.ColorGreen
ExitScreenId = -1
)
func NewApp() *AppState {
@@ -70,7 +75,7 @@ func (a *AppState) run(parms []string) int {
mainBundle := termboxScreen.Bundle{}
mainBundle.SetValue(MainBundleListKey, MainBundleListTodo)
if err := a.uiManager.InitializeScreen(MainScreenId, mainBundle); err != nil {
if err := a.uiManager.InitializeScreen(ScreenIdMain, mainBundle); err != nil {
return 1
}
if err := a.uiManager.Loop(); err != nil {