About overlay class

Started by zhangbo8808, July 11, 2012, 12:45:36 PM

Previous topic - Next topic

zhangbo8808

I want to show some pictures above my screen(for example,arrow/up/down/left),so I use overlay.
I wrote like this:

Texture arrowdown=new Texture(BitmapHelper.rescale(LoaderMana.LoadBitMap(R.drawable.arrowdown),128,128));
TextureManager.getInstance().addTexture("arrowdown",  arrowdown);
Overlay down = new Overlay(world, 128, 128, 256, 0, "arrowdown");

But the arrow did't show,Is there any problems?or is there any other ways?

EgonOlsen

You can use FrameBuffer.blit(...) instead. However, Overlay actually works fine as far as i know. Your coordinates look a bit strange though:

128, 128, 256, 0
   
Your lower right corner y value is above the upper left...that doesn't make much sense.

zhangbo8808

thank you, I got it. very low gradewrong. I thought the L+B is the origion(actually the L+T). so my overlay is out of my screen