Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten gamepad event class draft #7244

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

Jonathhhan
Copy link
Contributor

@Jonathhhan Jonathhhan commented Dec 11, 2022

I tried to make a class for gamepad events, maybe its better than to include everything in ofxAppEmscriptenWindow.
Just add #include ofxEmscriptenGamePad.h to ofApp.h and call gamepad.gamePadData() in ofUpdate() for updating the gamepad events. Just need to find a way how to return the data, maybe someone has an idea?
This is why I closed this PR (there is some information about gamepad events and how I adapted them): #7243
But the event array I mention there, thats also included in this class, could be useful for other events, too.
What do you think about that approach @ofTheo? A similar thing could be done for the webMidi stuff...
And maybe someone wants to optimize the class, if it is a good approach, because I am really not experienced in making classes ;)

@Jonathhhan
Copy link
Contributor Author

Jonathhhan commented Dec 11, 2022

Another idea is to make one class (ofxEmscriptenEvents for example) that holds all Emscripten events, that are not connectet to ofBaseEvents. This way, I would know how to pass the values to ofApp.cpp(edit: actually not true, yet)...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant