fixing mouseUp on NSMenu; making pen on buildingmaker work

This commit is contained in:
minjaesong
2019-02-03 23:53:46 +09:00
parent 8da8fdb863
commit 072f6564fe
8 changed files with 96 additions and 31 deletions

View File

@@ -60,12 +60,14 @@ abstract class UICanvas(
get() = Terrarum.mouseScreenY - handler.posY
/** If mouse is hovering over it regardless of its visibility */
val mouseUp: Boolean
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
open val mouseUp: Boolean
get() = _mouseUpThis || handler.mouseUp
/** If mouse is hovering over it and mouse is down */
val mousePushed: Boolean
get() = mouseUp && Gdx.input.isButtonPressed(AppLoader.getConfigInt("mouseprimary"))
private val _mouseUpThis: Boolean
get() = relativeMouseX in 0..width - 1 && relativeMouseY in 0..height - 1
/** Called by the screen */
fun update(delta: Float) {