reflection goes out of the window

This commit is contained in:
2019-11-10 01:24:45 +03:00
parent bc00262ead
commit f442dc6921
16 changed files with 87 additions and 63 deletions

View File

@ -72,8 +72,10 @@ func main() {
level, rooms := mapgens.DefaultGen(gamemap.NewLevel(mainCtx, "test", 1))
State.Level = level
sidebarWidth := 0
//Set up viewport
vp := mainwindow.NewViewPort(30, 0, (mw.W - 30), (mw.H - 0), mw.GetLayer("base"))
vp := mainwindow.NewViewPort(sidebarWidth, 0, (mw.W - sidebarWidth), (mw.H - 0), mw.GetLayer("base"))
go vp.Listen(State)
//set up controller
@ -126,7 +128,7 @@ func main() {
"Items in your backpack:",
//"[color=yellow]Note[/color]: Many of these are not implemented yet",
"",
types.NewCenteredRect(mw.Rect, 50, 15),
types.NewCenteredRect(mw.Rect, 70, 25),
true, ).
SetBgColor("#ef305c70").
SetFgColor("white").
@ -232,7 +234,7 @@ func decodeInput(ctx util.ClientCtx, baseLayer *mainwindow.Layer) {
return
}
var pressed = ""
var isModifier, _ = util.InArray(keycode, modifiers)
var isModifier, _ = util.IntInSlice(keycode, modifiers)
if !isModifier {
pressed = ui.Scancodemap[keycode]