
GUI Opacity
GUI Opacity
Wondering how to fix this problem. Basically I have drop down boxes, combo boxes. But when you drop down the one on top you can still see the others through it, I need a way to make it opaque. I have looked at trying to do it with gi->getSkin()->setColor() But I just can't seem to get it working. Can anyone help?


But the cage only had "Warning: Vicious Lions" on it! Im a programmer! I only listen to errors!
Yeah I know it's not a bug, I just don't know how to do it!
How do I adjust the transparency to 255? Is it part of the GUI object or part of each combo box? They are just default creation of a combo box, I just can't work out how to adjust the transparency of the combo-box background
But the cage only had "Warning: Vicious Lions" on it! Im a programmer! I only listen to errors!
Code: Select all
s32 alpha = 255;
for (u32 i = 0; i < EGDC_COUNT ; ++i)
{
SColor color = env->getSkin()->getColor ((EGUI_DEFAULT_COLOR)i);
color.setAlpha (alpha);
env->getSkin()->setColor ((EGUI_DEFAULT_COLOR)i, color);
}Thanks man, so basically that just sets every GUI elements Alpha to 255... it looks very... Windows 95ish, I will have to play around to get the right ones... but thanks for the code, in essence it does what I need.
More specifically for future reference:
SColor color = gi->getSkin()->getColor (EGDC_3D_HIGH_LIGHT);
color.setAlpha (225);
gi->getSkin()->setColor (EGDC_3D_HIGH_LIGHT, color);
Where EGDC_3D_HIGH_LIGHT = 3;
More specifically for future reference:
SColor color = gi->getSkin()->getColor (EGDC_3D_HIGH_LIGHT);
color.setAlpha (225);
gi->getSkin()->setColor (EGDC_3D_HIGH_LIGHT, color);
Where EGDC_3D_HIGH_LIGHT = 3;
Last edited by LordNyson on Wed Aug 12, 2009 11:46 am, edited 1 time in total.
But the cage only had "Warning: Vicious Lions" on it! Im a programmer! I only listen to errors!