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
Support
General Support
Flickering Tv-guide and other overlays with EVR enabled
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="tourettes" data-source="post: 256377" data-attributes="member: 10858"><p>Here's the promised core.dll and changed code for GUIButton3PartControl.cs </p><p></p><p>[code]</p><p> /// <summary></p><p> /// Renders the GUIButton3PartControl.</p><p> /// </summary></p><p> public override void Render(float timePassed)</p><p> {</p><p> // Do not render if not visible.</p><p> if (!IsVisible)</p><p> {</p><p> base.Render(timePassed);</p><p> return;</p><p> }</p><p> _cachedTextLabel1 = _tagLabel1;</p><p> _cachedTextLabel2 = _tagLabel2;</p><p> if (_containsProperty1 && _property1Changed)</p><p> {</p><p> _property1Changed = false;</p><p> _cachedTextLabel1 = GUIPropertyManager.Parse(_tagLabel1);</p><p> if (_cachedTextLabel1 == null) _cachedTextLabel1 = "";</p><p> _reCalculate = true;</p><p> }</p><p> if (_containsProperty2 && _property2Changed)</p><p> {</p><p> _property2Changed = false;</p><p> _cachedTextLabel2 = GUIPropertyManager.Parse(_tagLabel2);</p><p> if (_cachedTextLabel2 == null) _cachedTextLabel2 = "";</p><p> _reCalculate = true;</p><p> }</p><p> if (_reCalculate)</p><p> {</p><p> Calculate();</p><p> }</p><p></p><p> //render the icon</p><p> if (_imageIcon != null)</p><p> {</p><p> _imageIcon.Render(timePassed);</p><p> }</p><p></p><p> // render the 1st line of text on the button</p><p> int iWidth = _imageNonFocusedMid.Width - 10 - _textOffsetX1;</p><p> if (iWidth <= 0) iWidth = 1;</p><p> if (_imageNonFocusedMid.IsVisible && _cachedTextLabel1.Length > 0)</p><p> {</p><p> int widthLeft = (int)((float)_imageFocusedLeft.TextureWidth * ((float)_height / (float)_imageFocusedLeft.TextureHeight));</p><p> int xoff = _textOffsetX1 + widthLeft;</p><p></p><p> if (Disabled)</p><p> _labelControl1.TextColor = _disabledColor;</p><p> else</p><p> _labelControl1.TextColor = _textColor1;</p><p> _labelControl1.SetPosition(xoff + _positionX, _textOffsetY1 + _positionY);</p><p> _labelControl1.TextAlignment = GUIControl.Alignment.ALIGN_LEFT;</p><p> _labelControl1.FontName = _fontName1;</p><p> _labelControl1.Label = _cachedTextLabel1;</p><p> _labelControl1.Width = iWidth;</p><p> _labelControl1.Render(timePassed);</p><p> }</p><p></p><p> // render the 2nd line of text on the button</p><p> if (_imageNonFocusedMid.IsVisible && _cachedTextLabel2.Length > 0)</p><p> {</p><p> int widthLeft = (int)((float)_imageFocusedLeft.TextureWidth * ((float)_height / (float)_imageFocusedLeft.TextureHeight));</p><p> int xoff = _textOffsetX2 + widthLeft;</p><p></p><p> if (Disabled)</p><p> _labelControl2.TextColor = _disabledColor;</p><p> else</p><p> _labelControl2.TextColor = _textColor2;</p><p> _labelControl2.SetPosition(xoff + _positionX, _textOffsetY2 + _positionY);</p><p> _labelControl2.TextAlignment = GUIControl.Alignment.ALIGN_LEFT;</p><p> _labelControl2.FontName = _fontName1;</p><p> _labelControl2.Label = _cachedTextLabel2;</p><p> _labelControl2.Width = iWidth - 10;</p><p> _labelControl2.Render(timePassed);</p><p> }</p><p> </p><p> // if the GUIButton3PartControl has the focus</p><p> if (Focus)</p><p> {</p><p> //render the focused images</p><p> //if (_imageIcon!=null) GUIFontManager.Present();//TODO:not nice. but needed for the tvguide</p><p> if (renderLeftPart) _imageFocusedLeft.Render(timePassed);</p><p> _imageFocusedMid.Render(timePassed);</p><p> if (renderRightPart) _imageFocusedRight.Render(timePassed);</p><p> GUIPropertyManager.SetProperty("#highlightedbutton", _cachedTextLabel1);</p><p> }</p><p> else</p><p> {</p><p> //else render the non-focus images</p><p> //if (_imageIcon!=null) GUIFontManager.Present();//TODO:not nice. but needed for the tvguide</p><p> if (renderLeftPart) _imageNonFocusedLeft.Render(timePassed);</p><p> _imageNonFocusedMid.Render(timePassed);</p><p> if (renderRightPart) _imageNonFocusedRight.Render(timePassed);</p><p> }</p><p> base.Render(timePassed);</p><p> }</p><p>[/code]</p></blockquote><p></p>
[QUOTE="tourettes, post: 256377, member: 10858"] Here's the promised core.dll and changed code for GUIButton3PartControl.cs [code] /// <summary> /// Renders the GUIButton3PartControl. /// </summary> public override void Render(float timePassed) { // Do not render if not visible. if (!IsVisible) { base.Render(timePassed); return; } _cachedTextLabel1 = _tagLabel1; _cachedTextLabel2 = _tagLabel2; if (_containsProperty1 && _property1Changed) { _property1Changed = false; _cachedTextLabel1 = GUIPropertyManager.Parse(_tagLabel1); if (_cachedTextLabel1 == null) _cachedTextLabel1 = ""; _reCalculate = true; } if (_containsProperty2 && _property2Changed) { _property2Changed = false; _cachedTextLabel2 = GUIPropertyManager.Parse(_tagLabel2); if (_cachedTextLabel2 == null) _cachedTextLabel2 = ""; _reCalculate = true; } if (_reCalculate) { Calculate(); } //render the icon if (_imageIcon != null) { _imageIcon.Render(timePassed); } // render the 1st line of text on the button int iWidth = _imageNonFocusedMid.Width - 10 - _textOffsetX1; if (iWidth <= 0) iWidth = 1; if (_imageNonFocusedMid.IsVisible && _cachedTextLabel1.Length > 0) { int widthLeft = (int)((float)_imageFocusedLeft.TextureWidth * ((float)_height / (float)_imageFocusedLeft.TextureHeight)); int xoff = _textOffsetX1 + widthLeft; if (Disabled) _labelControl1.TextColor = _disabledColor; else _labelControl1.TextColor = _textColor1; _labelControl1.SetPosition(xoff + _positionX, _textOffsetY1 + _positionY); _labelControl1.TextAlignment = GUIControl.Alignment.ALIGN_LEFT; _labelControl1.FontName = _fontName1; _labelControl1.Label = _cachedTextLabel1; _labelControl1.Width = iWidth; _labelControl1.Render(timePassed); } // render the 2nd line of text on the button if (_imageNonFocusedMid.IsVisible && _cachedTextLabel2.Length > 0) { int widthLeft = (int)((float)_imageFocusedLeft.TextureWidth * ((float)_height / (float)_imageFocusedLeft.TextureHeight)); int xoff = _textOffsetX2 + widthLeft; if (Disabled) _labelControl2.TextColor = _disabledColor; else _labelControl2.TextColor = _textColor2; _labelControl2.SetPosition(xoff + _positionX, _textOffsetY2 + _positionY); _labelControl2.TextAlignment = GUIControl.Alignment.ALIGN_LEFT; _labelControl2.FontName = _fontName1; _labelControl2.Label = _cachedTextLabel2; _labelControl2.Width = iWidth - 10; _labelControl2.Render(timePassed); } // if the GUIButton3PartControl has the focus if (Focus) { //render the focused images //if (_imageIcon!=null) GUIFontManager.Present();//TODO:not nice. but needed for the tvguide if (renderLeftPart) _imageFocusedLeft.Render(timePassed); _imageFocusedMid.Render(timePassed); if (renderRightPart) _imageFocusedRight.Render(timePassed); GUIPropertyManager.SetProperty("#highlightedbutton", _cachedTextLabel1); } else { //else render the non-focus images //if (_imageIcon!=null) GUIFontManager.Present();//TODO:not nice. but needed for the tvguide if (renderLeftPart) _imageNonFocusedLeft.Render(timePassed); _imageNonFocusedMid.Render(timePassed); if (renderRightPart) _imageNonFocusedRight.Render(timePassed); } base.Render(timePassed); } [/code] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Flickering Tv-guide and other overlays with EVR enabled
Contact us
RSS
Top
Bottom