more checking rooms

This commit is contained in:
anton.gurov
2019-11-12 14:52:17 +03:00
parent 4bdb51d9e3
commit 7837051e80
13 changed files with 82 additions and 37 deletions

View File

@ -13,7 +13,7 @@ type DevmenuScreen struct {
scm *types.ScreenManager
state *gamestate.GameState
*types.Rect
types.Rect
renderParent bool
@ -21,7 +21,7 @@ type DevmenuScreen struct {
fgColor string
}
func NewDevmenuScreen(mw *mainwindow.MainWindow, scm *types.ScreenManager, state *gamestate.GameState, rect *types.Rect, renderParent bool) *DevmenuScreen {
func NewDevmenuScreen(mw *mainwindow.MainWindow, scm *types.ScreenManager, state *gamestate.GameState, rect types.Rect, renderParent bool) *DevmenuScreen {
return &DevmenuScreen{
mw: mw,
scm: scm,

View File

@ -11,7 +11,7 @@ import (
const runeIndex = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
type MenuScreen struct {
*types.Rect
types.Rect
mw *mainwindow.MainWindow
scm *types.ScreenManager
@ -31,7 +31,7 @@ type MenuScreen struct {
fgColor string
}
func NewMenuScreen(mw *mainwindow.MainWindow, scm *types.ScreenManager, title, header, footer string, rect *types.Rect, renderParent bool) *MenuScreen {
func NewMenuScreen(mw *mainwindow.MainWindow, scm *types.ScreenManager, title, header, footer string, rect types.Rect, renderParent bool) *MenuScreen {
return &MenuScreen{
title: title,
header: header,
@ -141,7 +141,7 @@ func (ms *MenuScreen) ListRender() {
menuItems = append(menuItems, ms.items[i].(string))
}
}
ilw, ilh = menuLayer.PrintInside(&itemField, strings.Join(menuItems, "\n"), blt.TK_ALIGN_LEFT)
ilw, ilh = menuLayer.PrintInside(itemField, strings.Join(menuItems, "\n"), blt.TK_ALIGN_LEFT)
}
if ilh < len(ms.items) {
ms.drawScrollBar(menuLayer, itemField)