|
|
@ -49,6 +49,9 @@ func (ui *UI) Run() {
|
|
|
|
ui.Info("saw ctrl+c keyboard input, shutting down")
|
|
|
|
ui.Info("saw ctrl+c keyboard input, shutting down")
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
case *tcell.EventResize:
|
|
|
|
|
|
|
|
width, height = ui.screen.Size()
|
|
|
|
|
|
|
|
b = newBuffer(width, height)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ui.Info("input event: %v", e)
|
|
|
|
ui.Info("input event: %v", e)
|
|
|
|
wants := ui.root.handleEvent(e)
|
|
|
|
wants := ui.root.handleEvent(e)
|
|
|
@ -200,6 +203,17 @@ var inGameView = &containerView{
|
|
|
|
frame: math.Rect{math.Vec{0, 0}, 4, 4},
|
|
|
|
frame: math.Rect{math.Vec{0, 0}, 4, 4},
|
|
|
|
view: &gameView{},
|
|
|
|
view: &gameView{},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
frame: math.Rect{math.Vec{4, 0}, 4, 4},
|
|
|
|
|
|
|
|
view: &menuList{
|
|
|
|
|
|
|
|
choices: []menuItem{
|
|
|
|
|
|
|
|
menuItem{name: "chocolate"},
|
|
|
|
|
|
|
|
menuItem{name: "vanilla"},
|
|
|
|
|
|
|
|
menuItem{name: "strawberry"},
|
|
|
|
|
|
|
|
menuItem{name: "banana"},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
frame: math.Rect{math.Vec{0, 4}, 8, 4},
|
|
|
|
frame: math.Rect{math.Vec{0, 4}, 8, 4},
|
|
|
|
view: &chatView{},
|
|
|
|
view: &chatView{},
|
|
|
|