Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Basically the question is in the title.

I'm creating a RTS game and I will need buttons like attack move / attack ground, etc. I am not using any engine.

When people do games in OpenGL for android (my case), do they ever use android components to control the game or do they create their components in the game? What are the general recommended approach, if there's any? How about more complex components like scrolling lists of items , etc? I would also appreciate you to pair your answer with a brief comment about how was your experience using the approach(es) you describe.

Thanks :)

share|improve this question
    
I would say create your own set of UI controls. This way you can easier theme them, add effects to them, etc. But this is just based on my experience, and I've done very little android programming. –  hayer Sep 26 '12 at 6:27
add comment

1 Answer 1

You can add your controls using ImageView, View to your SurfaceView like if this one was a RelativeLayout.

With this method you will easily track touchEvent, OnClick etc...

Well this is how I do for my game and it works well !

NB: I didn't try with ListView etc... but if you customize its UI to have the same look as your game I don't see where the problem can be.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.