Closed KLA6 closed 2 years ago
Just FYI, I can use this to detect 'pointerup' to mix with the button's action. : )
scene.input.on('pointerdown', function(pointer){
// ...
});
BTW, I'm asking whether there is any better way to make the codes to be simpler.
That's an application specific feature, not a normal ui behavior, imo. Thus I won't add it into Buttons. On the other hand, there has press behavior in rexui package
var press = scene.rexUI.add.press(gameObject, config)
.on('pressstart', function(press, gameObject, lastPointer){
})
.on('pressend', function(press, gameObject, lastPointer){
})
Thank you so much for your quick response, I've noted well...! : )
I always appreciate for your great library, and I have a more question.
In the UI Buttons, the button has a custom event as 'button.click'.
But it has a configuration as 'click' which only choose one of 'pointerdown' and 'pointerup'.
I want to make a button...
Is there any wat to detect both of click down and up on one button...?
Thank you for your reading.