Ambiera Forum

Discussions, Help and Support.

Ambiera Forum > CopperLicht
about setShowImage ...

zforgo
Registered User
Quote
2011-09-29 07:50:30

Hi,

Can anybody tell me what is wrong with the next code:
var gomb = new CL3D.Overlay2DSceneNode();
gomb.set2DPosition(5, 5, 50, 50);
gomb.setShowBackgroundColor( true, CL3D.createColor(255, 100, 100, 100));
gomb.setShowImage(engine.TextureManager().getTexture("image.PNG", true));
scene.getRootSceneNode().addChild(gomb);

I see only the color background. Without setShowBackgroundColor nothing apears.

Please help
Thank you in advance.

Zoltan


codemastermike
Registered User
Quote
2011-09-29 15:15:58

I dont think you can use background color and a texture at the same time. At least I couldnt when I tried this out.

I used one Overlay2DSceneNode with background color and a texture,
and one Overlay2DSceneNode without any background color and a texture. The Overlay without a background color displayed the texture, and the other one only displayed the background color.

Hope this helps!


niko
Moderator
Quote
2011-09-29 17:16:13

Yes, I think you are right. :)
As workaround: Just draw this stuff yourself, the renderer class has those draw2D.. just for that: http://www.ambiera.com/copperlic...


Create reply:


Posted by: (you are not logged in)


Enter the missing letter in: "Internat?onal" (you are not logged in)


Text:

 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


   






Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact