How do I set a transparent image on a button? Using IGUIButton::setImage()
I have a transparent PNG, but the transparent pixels are being replaced with the color black.
Transparent Button Image
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact:
Did you try the following?How do I set a transparent image on a button?
Code: Select all
button->setUseAlphaChannel(true);
Code: Select all
recti buttonRect = recti(100,170,228,202);
IGUIButton* button = pManager->getGUIEnvironment()->addButton(buttonRect);
button->setImage(pManager->getDriver()->getTexture("Your file path.png"));
button->setUseAlphaChannel(true);
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact:
-
- Posts: 26
- Joined: Fri Aug 20, 2010 11:07 am
- Location: Bulgaria
also apply
Code: Select all
button->setDrawBorder(0);
-
- Posts: 222
- Joined: Mon Jan 19, 2009 10:03 pm
- Location: Miami, Florida
- Contact: