Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8859647
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:07:01+00:00 2026-06-14T15:07:01+00:00

I have HorizontalOnScreenControl class which extends BaseOnScreenControl, it is the same as DigitalOnScreenControl, but

  • 0

I have HorizontalOnScreenControl class which extends BaseOnScreenControl, it is the same as DigitalOnScreenControl, but it works only horizontal. It’s working fine. But one of this parents is Scene, and I think that why we need to do scene.setChildScene(mDigitalOnScreenControl).

Problem: when I want, for example, show popup and when I use .setChildScene() one more time, my control disappears. But if I try to add directly to main scene: scene.AttachChild(mDigitalOnScreenControl) than I can’t touch it, it’s is not working, but visible.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:07:02+00:00Added an answer on June 14, 2026 at 3:07 pm

    You should use Camera.setHUD instead of Scene.setChildScene.

    Quoting from the HUD.java file:

    While you can add a HUD to Scene, you should not do so. HUDs are meant to be added to Cameras via Camera.setHUD(HUD).

    If you need to add 2 or more HUDs, you can chain them this way (I have 2 HUDs in one of my games, and that’s how I do it. Works fine)

    hud2.setChildScene(hud3);
    hud1.setChildScene(hud2);
    camera.setHUD(hud1);
    

    Now you can call Scene.setChildScene and your control won’t disappear.

    General knowledge: When AndEngine receives a touch event from the Android framework, the event passes through a list entities. If any of them consumes the event, it stops. The priorities are:

    1. Camera’s HUD (If exists)
    2. Child scene (If exists)
    3. Touch areas in the scene (If there are any)
    4. onSceneTouchEvent method.

    Now, in your problem, when you attach the control to the scene as a regular entity, it doesn’t receive the priority it should (Controls – HUDs have a first priority). So the event was probably consumed before it even reached the control.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Have deployed numerous report parts which reference the same view however one of them
have written this little class, which generates a UUID every time an object of
Have two tables say ABC and XYZ and contain one column which data will
Have posting working wonderfully, and reading the response happily EXCEPT when one of the
Have searched for the answer but no joy, so here goes... I'm working on
Have a simple one-off tasks which needs a progress bar. OpenSSL has a useful
Have a fun issue with sharepoint calendar view filtering. That code works fine: SPSecurity.RunWithElevatedPrivileges(delegate()
Have you ever tried working with a XAML file which contains thousand tons of
Have the following validation for date comparison, which works when invalid dates are entered
Have a procedure which looks like Procedure TestProc(TVar1, TVar2 : variant); Begin TVar1 :=

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.