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

Clicks not recogniced on Android #134

Closed
michaelrampl opened this issue Nov 14, 2022 · 3 comments · Fixed by #180
Closed

Clicks not recogniced on Android #134

michaelrampl opened this issue Nov 14, 2022 · 3 comments · Fixed by #180

Comments

@michaelrampl
Copy link

michaelrampl commented Nov 14, 2022

The following "on update system" works well on desktop. Unfortunately, on mobile I cannot get it working properly. It seems like clicks/taps are not recognized so even I create other elements such as sliders, dropdowns, ... and try to tap them, nothing happens.

fn update_menu(mut egui_context: ResMut<EguiContext>) {
    egui::containers::Area::new("main_container").show(egui_context.ctx_mut(), |ui| {
    ui.button("click me");
...

These are my dependencies

[dependencies.bevy]
version = "0.9.0"
default-features = false
features = [
  "render",
  "bevy_asset",
  "png",
  "x11"
]

[dependencies.bevy_egui]
version = "0.17.1"
default-features = false
features = [
  "default_fonts"
]

As far as I have seen in https://github.com/rust-windowing/android-ndk-rs, egui should work on android so what am I missing here? (I'm using cargo apk to build the android package)

@vladbat00
Copy link
Owner

Hi! Thanks for creating the issue. Touch events support just doesn't exist in bevy_egui atm.
It was also mentioned in #104 (that issue was originally about touch events support in web though), and @michaelrampl suggested a patch that implements it. Tbh, I totally forgot to look into it. I'll try to test it next weekend and will create a new release if everything is working.

@michaelrampl
Copy link
Author

I would be glad to help testing once this has been merged ....
Anyway I wonder - The PR seems to add something to winit even tough bevy uses this already and touch is working in plain bevy apps for me (just implemented zoom gestures the other day. So are we sure that we need to fix that in winit?

@vladbat00
Copy link
Owner

@michaelrampl I meant this patch specifically: #104 (comment).
It shouldn't require any changes to winit.

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 a pull request may close this issue.

2 participants