loading works but not quite

This commit is contained in:
minjaesong
2021-10-12 16:48:54 +09:00
parent ce1289efe3
commit 1a7c01825d
3 changed files with 135 additions and 88 deletions

View File

@@ -44,6 +44,8 @@ import net.torvald.terrarum.Terrarum
* As mentioned in [UICanvas], UIItems must be added to the Canvas to make listeners work without implementing
* everything by yourself.
*
* PROTIP: if [clickOnceListener] does not seem to work, make sure your parent UI is handling touchDown() and touchUp() events!
*
* @param initialX initial position of the item. Useful for making transition that requires the item to be moved
* @param initialY initial position of the item. Useful for making transition that requires the item to be moved
*
@@ -113,7 +115,10 @@ abstract class UIItem(var parentUI: UICanvas, val initialX: Int, val initialY: I
open var touchUpListener: ((Int, Int, Int, Int) -> Unit)? = null
/** Parameters: amountX, amountY */
open var scrolledListener: ((Float, Float) -> Unit)? = null
/** Parameters: relative mouseX, relative mouseY, button */
/** Parameters: relative mouseX, relative mouseY, button
*
* PROTIP: if clickOnceListener does not seem to work, make sure your parent UI is handling touchDown() and touchUp() events!
*/
open var clickOnceListener: ((Int, Int, Int) -> Unit)? = null
open var clickOnceListenerFired = false