action listener on textbutton list

This commit is contained in:
minjaesong
2017-07-20 22:25:40 +09:00
parent 48b8923434
commit cb8d3fd8b9
13 changed files with 215 additions and 53 deletions

View File

@@ -114,8 +114,6 @@ abstract class UIItem(var parentUI: UICanvas) { // do not replace parentUI to UI
return false
}
open fun touchDown(screenX: Int, screenY: Int, pointer: Int, button: Int): Boolean {
println("trsaneirsatneioarsteniotrsaneioarstineoarstneio")
var actionDone = false
if (touchDownListener != null) {
@@ -123,7 +121,9 @@ abstract class UIItem(var parentUI: UICanvas) { // do not replace parentUI to UI
actionDone = true
}
if (!clickOnceListenerFired && mouseUp) {
if (clickOnceListener != null && !clickOnceListenerFired && mouseUp) {
println("arstineotarsneio")
clickOnceListener!!.invoke(relativeMouseX, relativeMouseY, button)
actionDone = true
}