mattcolman / phaser-list-view

List view class for Phaser. Great for high scoreboards.
http://mattcolman.com/labs/phaser-list-view/index.html
MIT License
116 stars 21 forks source link

(listView) onInputDown not dispatched (but maybe solved) #18

Closed studiostart closed 7 years ago

studiostart commented 7 years ago

Hi, fantastic plugin! But testing it, I found that onInputDown event didn't work in list view (instead onInputUp worked).

In line 19096, there was this line: this.events.onInputDown.dispatch(target, pointer);

I changed it with: (0, _util.dispatchClicks)(pointer, this.clickables, 'onInputDown'); this.events.onInputDown.dispatch(target, pointer, _util.dispatchClicks);

and now it works. But I don't know if this change is really correct.

mattcolman commented 7 years ago

yes you're right. Sorry the code was already there, I just forgot to build it for running via script tag. Running npm run build builds phaser-list-view.js to the dist folder.