-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add Touchscreen Controls to HUD #15
Conversation
jbourqueendless
commented
Dec 3, 2024
- Introduced touchscreen controls for the game by adding TouchScreenButton nodes to the HUD.
- Controls include buttons for movement (left and right) and a jump action.
- Buttons are positioned as part of the HUD layout and are only visible on touchscreen devices.
- Tested functionality on desktop (using "Emulate Touch From Mouse") and mobile device.
Ooh, neat idea! It looks like your PR added a bunch of unused assets and the block-code addon as well. 😅 I can help you clean it up if you'd like, because I think this is a nice idea (and the clean-up process will be… informative? lol) (@endlessm/endless-developers: we should probably .gitignore |
OK I gotcha. So between the block coding and the images that came with the interface button asset pack what should be removed? All of the block coding plug in and any and all images not directly used or? |
@jbourqueendless full disclaimer: I haven't downloaded this branch to play with it yet. But generally, yeah, I would remove the block coding plugin, and then maybe instead of keeping all of the assets in their original locations/names (like |
@jbourqueendless yes, as @cassidyjames said, only
|
Ok I have removed all but a small selection of control button pngs from the asset pack. I also reorganized them and renamed them (which I am adding here because I forgot to mention that in the commit message :-/ ). Block coding plugin and files are also removed. |
In this one we don't use any addons right now, but in moddable pong we do: https://github.com/endlessm/moddable-pong/tree/main/addons/DampedOscillator. I don't think ignoring it would be right. |
project.godot
Outdated
switch="" | ||
animator="" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this (and the addition of switch.tscn
) are also not meant to be part of this PR.
I've tested this on my laptop touchscreen: it looks great. With the stray changes removed, I'd say it's ready to (squash and) merge. @jbourqueendless would you like me/us to take care of the stray files and/or squashing? Or do you want to do either/both? |
That's ok I will remove the scene file and squash all these little commits. |
6ea3c1e
to
2f214a5
Compare
- Added PNG assets and nodes required for touchscreen controls. - Implemented three touchscreen buttons using Control UI and button nodes. - Enabled touchscreen-only visibility and updated unhandled input logic for HUD. - Adjusted buttons for better alignment and functionality. - Removed unused assets, files, and scenes accidentally included in the project.
2f214a5
to
d1a0522
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice!