home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
GUI Library Question
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="hamheed" data-source="post: 4003" data-attributes="member: 10388"><p>Hello GUI Developers,</p><p></p><p>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. </p><p></p><p>For example, in the GUIProgressControl class the following code exists:</p><p></p><p>[code][1] float fWidth = (float)m_iPercent;</p><p>[2] fWidth/=100.0f;</p><p>[3] fWidth *= (float) (m_guiBackground.Width-24-iWidthLeft-iWidthRight);</p><p>[4] int off=12;</p><p>[5] GUIGraphicsContext.ScaleHorizontal(ref off);</p><p>[6] int iXPos=off+m_guiBackground.XPosition;</p><p>[7] int iYPos= m_guiBackground.YPosition + (iBkgHeight - iHeightLeft ) / 2;[/code]</p><p></p><p>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).</p><p></p><p>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...</p><p></p><p>Can these hardcoded offsets be added to the skin files???</p><p></p><p>Maybe someone can explain to me why they are there before making the decision.</p><p></p><p>Thanks in advance!!!</p></blockquote><p></p>
[QUOTE="hamheed, post: 4003, member: 10388"] 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: [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;[/code] 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!!! [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
GUI Library Question
Contact us
RSS
Top
Bottom