merged
This commit is contained in:
parent
3886a05ce2
commit
31d5be5d07
@ -69,7 +69,7 @@ func (devm *DevmenuScreen) HandleInput(input string) {
|
|||||||
level.Tiles[idx].Visible = true
|
level.Tiles[idx].Visible = true
|
||||||
level.Tiles[idx].Explored = true
|
level.Tiles[idx].Explored = true
|
||||||
}
|
}
|
||||||
appctx.Logger(devm.ctx).Warn().Msg("making everything visible!")
|
appctx.Logger().Warn().Msg("making everything visible!")
|
||||||
devm.scm.SetScreen(devm.scm.PreviousScreen)
|
devm.scm.SetScreen(devm.scm.PreviousScreen)
|
||||||
break
|
break
|
||||||
case "p":
|
case "p":
|
||||||
|
@ -88,7 +88,7 @@ func (ms *MenuScreen) Render() {
|
|||||||
if ms.renderParent {
|
if ms.renderParent {
|
||||||
ms.scm.PreviousScreen.Render()
|
ms.scm.PreviousScreen.Render()
|
||||||
}
|
}
|
||||||
if (ms.redraw || ms.renderParent) {
|
if ms.redraw || ms.renderParent {
|
||||||
ms.redraw = false
|
ms.redraw = false
|
||||||
ms.drawFunc()
|
ms.drawFunc()
|
||||||
}
|
}
|
||||||
@ -96,13 +96,13 @@ func (ms *MenuScreen) Render() {
|
|||||||
|
|
||||||
func (ms *MenuScreen) ListHandleInput(input string) {
|
func (ms *MenuScreen) ListHandleInput(input string) {
|
||||||
switch input {
|
switch input {
|
||||||
case "Up":
|
case "Up", "k":
|
||||||
ms.offset = ms.offset - 1
|
ms.offset = ms.offset - 1
|
||||||
if ms.offset < 0 {
|
if ms.offset < 0 {
|
||||||
ms.offset = 0
|
ms.offset = 0
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
case "Down":
|
case "Down", "j":
|
||||||
ms.offset = ms.offset + 1
|
ms.offset = ms.offset + 1
|
||||||
if ms.offset > len(ms.items)-1 {
|
if ms.offset > len(ms.items)-1 {
|
||||||
ms.offset = len(ms.items) - 1
|
ms.offset = len(ms.items) - 1
|
||||||
@ -133,7 +133,7 @@ func (ms *MenuScreen) ListRender() {
|
|||||||
itemField := types.Rect{ms.X, ms.Y + headerHeight + 1, ms.W, ms.H - headerHeight - footerHeight}
|
itemField := types.Rect{ms.X, ms.Y + headerHeight + 1, ms.W, ms.H - headerHeight - footerHeight}
|
||||||
_ = itemField
|
_ = itemField
|
||||||
var ilw, ilh int
|
var ilw, ilh int
|
||||||
if (len(ms.items) > 0) {
|
if len(ms.items) > 0 {
|
||||||
//fixme itemfield object, scroller, inputhandler, current selected item
|
//fixme itemfield object, scroller, inputhandler, current selected item
|
||||||
menuItems := make([]string, 0)
|
menuItems := make([]string, 0)
|
||||||
for i := ms.offset; i < len(ms.items); i++ {
|
for i := ms.offset; i < len(ms.items); i++ {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user