SethRobinson / proton

Proton SDK: Seth's GL/GLES messy multi-platform C++ game SDK. Can output to Windows, OS X, iOS, Android, Linux (Raspbian too), HTML5, Flash
Other
79 stars 16 forks source link

Add scroll wheel support to ScrollComponent #12

Closed iProgramMC closed 10 months ago

iProgramMC commented 2 years ago

I'm not sure why this was not a thing already. The scroll wheel is already handled by proton so it was quite easy to add

iProgramMC commented 10 months ago

Hello @SethRobinson, I had actually found a bug with this PR but forgot to fix it. It's about how messages are passed to entities - they always add entities' positions to the vector2 without checking if they should. This affects the scroll wheel code because it adds the entities' positions to the scroll wheel delta, thereby causing you to always scroll down if your entity is low enough on the y axis. Do you mind fixing that, or should I submit another PR for that?

Edit: I already reported it in #16.

SethRobinson commented 10 months ago

I fixed it in an additional commit (d7bae58) before pushing them, sorry I probably should have applied it to the PR here for clarity