Hello GUI Developers,
I am currently working on the skin viewer and have been finding that some of my controls do not render correctly... After looking into the source code for the guilib, I have noticed that some of the controls use hardcoded offsets in them to place various images.
For example, in the GUIProgressControl class the following code exists:
Now everything in here makes sense to me except for the part where an extra 24 pixels is subtracted from the width (line 3). Similarily, an extra 12 pixels is added to the xpostion (line 7).
I don't have a problem with this, but am wondering if I should include these same hardcoded offsets in the skin/screen viewer rendering engine. If I don't, then the screens will not be exactly as displayed in the Media Portal...
Can these hardcoded offsets be added to the skin files???
Maybe someone can explain to me why they are there before making the decision.
Thanks in advance!!!
I am currently working on the skin viewer and have been finding that some of my controls do not render correctly... After looking into the source code for the guilib, I have noticed that some of the controls use hardcoded offsets in them to place various images.
For example, in the GUIProgressControl class the following code exists:
Code:
[1] float fWidth = (float)m_iPercent;
[2] fWidth/=100.0f;
[3] fWidth *= (float) (m_guiBackground.Width-24-iWidthLeft-iWidthRight);
[4] int off=12;
[5] GUIGraphicsContext.ScaleHorizontal(ref off);
[6] int iXPos=off+m_guiBackground.XPosition;
[7] int iYPos= m_guiBackground.YPosition + (iBkgHeight - iHeightLeft ) / 2;
Now everything in here makes sense to me except for the part where an extra 24 pixels is subtracted from the width (line 3). Similarily, an extra 12 pixels is added to the xpostion (line 7).
I don't have a problem with this, but am wondering if I should include these same hardcoded offsets in the skin/screen viewer rendering engine. If I don't, then the screens will not be exactly as displayed in the Media Portal...
Can these hardcoded offsets be added to the skin files???
Maybe someone can explain to me why they are there before making the decision.
Thanks in advance!!!