I'm having trouble translating the 3 lines of code between '////////' below to VB.net. Any help would be appreciated.
GetSkinInfo("Tree", "TextColor");
GetSkinInfo("StatusBar", "BackColor");
C# Example: translating a MC Color into a Color Object:
private Color getColor(String strItem, String strAttribute)
{
int intColor;
int intR;
int intG;
int intB;
intColor = mcRef.GetSkinInfo ( strItem, strAttribute );
if (intColor != -1)
{
////////////////// VB TRANSLATION ? //////////////////////
intR = intColor & 255;
intG = (intColor >> 8) & 255;
intB = (intColor >> 16) & 255;
///////////////////////////////////////////////////////////////
return Color.FromArgb ( intR, intG, intB );
}
else
{
// Return a default Color if not found!
return Color.LightGray;
}
}
...
Panel.BackColor = getColor ( "Tree", "BackColor" );
A quick explanation how the hex color value in a main.xml is converted to the resulting integer of GetSkinInfo may be helpful, too.
Also, how is it possible to have GetSkinInfo return an image filename, or any skin item value that is not a color? Doesn't seem so if the return value of GetSkinInfo is an integer.