Multitexturing and transparency

Well, I’ve done a few searches and haven’t found any help, so I figured I’d post.



I’m working on an in-game menu.  The menu has a bunch of buttons.  The button background is the same for all, but the text/image on the button is different for each (obviously).  Sounds like a problem for multitexturing: one texture for the background of the button, and one for the foreground.



Both foreground and background textures are PNGs with transparency, and if I apply one or the other, they seem to work, but I’m having difficulty getting them to combine transparency properly.  I’ve attached the two texture images along with a third image that is where I’m trying to get to.



What I’m looking for is a bit of assistance with the setApply and setCombine* calls.  I trust this is enough information, and that the pictures I’m attaching explain it sufficiently.



Thanks in advance.



Background Texture:





Foreground Texture:





Desired Result:



textTexture.setApply( Texture.ApplyMode.Decal );

I did try that.  The result is close to what I want, but not quite.  The "Create Avatar" text turns partially transparent… I suspect it's combining transparency with the background texture.  I'd like the "Create Avatar" text to be opaque.


                TextureState ts=DisplaySystem.getDisplaySystem().getRenderer().createTextureState();      
      ts.setTexture(backgroundImage,0);
      Texture logo=ResourceManager.loadTexture("V8StreetDragGTLogo.png");
      ts.setTexture(logo,1);
      logo.setApply( Texture.ApplyMode.Decal );
      
      backgroundPlane.copyTextureCoordinates(0, 1, 1.0f);



Just that works for me!