more zfm stuffs

This commit is contained in:
minjaesong
2023-01-12 01:47:47 +09:00
parent 99a9b7ab6b
commit bf4a337f0a
3 changed files with 234 additions and 133 deletions

View File

@@ -2,10 +2,10 @@ class WindowObject {
constructor(x, y, w, h, inputProcessor, drawContents, title, drawFrame) {
this.isHighlighted = false
this.x = x
this.y = y
this.width = w
this.height = h
this.x = x|0
this.y = y|0
this.width = w|0
this.height = h|0
this.inputProcessorFun = inputProcessor
this.drawContentsFun = drawContents
this.title = title
@@ -77,7 +77,7 @@ class WindowObject {
drawContents() { this.drawContentsFun(this) }
drawFrame() { this.drawFrameFun(this) }
processInput(event) { this.inputProcessor(this, event) }
processInput(event) { this.inputProcessorFun(this, event) }
}