NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 10 11 12 13 14 … 93 Next »
How to prevent default screen background?

 
  • 0 Vote(s) - 0 Average
How to prevent default screen background?
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#1
2011-08-17, 05:36 PM
I am trying to get a solid black background for my screen (implements IScreenPlugin directly). If I have nothing in my skin file the default background image and date/clock are displayed. If I have a skin element that is a black rectangle covering the whole screen, the clock is still drawn on top of everything. How do you prevent this? Sorry if I am missing something obvious.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#2
2011-08-17, 05:56 PM
cncb Wrote:If I have nothing in my skin file the default background image and date/clock are displayed.
This was intentional to give things a more consistent look. If you'd seen the old GBPVR you'd know why. Big Grin

Quote:If I have a skin element that is a black rectangle covering the whole screen, the clock is still drawn on top of everything. How do you prevent this? Sorry if I am missing something obvious.
There isnt an 'obvious' solution to this, but there is a trick that screensavers use that would work. For you black rectangle, give the element a name starting with "screensaver" and it'll not add the date/time or now-playing on top.

Maybe something like this:
Code:
private UiElement blackUiElement;

in init function:
            Bitmap black = new Bitmap(32,32);
            Graphics g = Graphics.FromImage(black);
            g.Clear(Color.Black);
            g.Dispose();
            blackUiElement = new UiElement("screensaver-black", new RectangleF(0, 0, 100, 100), black);

GetRenderList:
        public List<UiElement> GetRenderList()
        {
            List<UiElement> renderList = new List<UiElement>();
            renderList.Add(blackUiElement);
            ...other elements...
            return renderList;
        }
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#3
2011-08-17, 07:07 PM
Thanks - I followed your instructions but with an empty skin file the clock is still being displayed over the black rectangle for me?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#4
2011-08-17, 07:44 PM
Unfirtunately my build is no longer compatible with 2.1, so I'm not well placed to give you a patch with more logging, but can you add something like this to the end of your GetRenderList() and post the snippet of log:

Code:
Logger.Debug("render list contains");
foreach (UiElement element in popupRenderList)
{
   Logger.Debug(" - " + element.name);
}
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#5
2011-08-17, 08:11 PM
Here is the log:

Code:
2011-08-17 16:01:41.224    [DEBUG][1]    ACTIVATE_PLUGIN: SS
2011-08-17 16:01:41.229    [DEBUG][1]    OnKeyDown() done. Took 11.000599861145 ms
2011-08-17 16:01:41.481    [DEBUG][1]    FadeThroughTransitionHelper.GetRenderList() transition complete
2011-08-17 16:01:41.481    [DEBUG][1]    render list contains
2011-08-17 16:01:41.481    [DEBUG][1]     - screensaver-black
2011-08-17 16:01:45.427    [DEBUG][1]    render list contains
2011-08-17 16:01:45.427    [DEBUG][1]     - screensaver-black
2011-08-17 16:01:45.428    [DEBUG][1]    storing Position (1):220,26
2011-08-17 16:01:45.428    [DEBUG][1]    storing Size (1):1400,902
2011-08-17 16:01:45.446    [INFO][1]    Exiting...
2011-08-17 16:01:45.446    [INFO][1]    Done.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#6
2011-08-17, 08:23 PM
I worked out why this didnt work. I forgot the screen savers work as popups rather than screens. I've adjusted to the logic for the next release to also work in your situation. Instead of "screensaver" though, it'll use a "block-extras" element name to tell it to not add the background or datetime.

Unfortunately its bad timing in the release cycle, and I'm not able to give you a patch for this at the moment, so you might need to use your imagination an just pretend the default background and clock aren't there until the next release is available. It should be available in the next week or two.
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#7
2011-08-17, 08:27 PM
sub Wrote:I've adjusted to the logic for the next release to also work in your situation. Instead of "screensaver" though, it'll use a "block-extras" element name to tell it to not add the background or datetime.
Will that suppress the nowPlaying info too?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,626
Threads: 767
Joined: Nov 2003
#8
2011-08-17, 08:30 PM
Yes. It wont suppress the ShowMessage overlay though.
ACTCMS
Offline

Posting Freak

UK
Posts: 2,730
Threads: 101
Joined: Jun 2007
#9
2011-08-17, 08:34 PM
sub Wrote:Yes. It wont suppress the ShowMessage overlay though.
Great...
cncb
Offline

Senior Member

Posts: 729
Threads: 112
Joined: Aug 2011
#10
2011-08-17, 09:17 PM
sub Wrote:Unfortunately its bad timing in the release cycle, and I'm not able to give you a patch for this at the moment, so you might need to use your imagination an just pretend the default background and clock aren't there until the next release is available.

No problem - thanks.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple lists like in Search Screen cncb 7 3,216 2012-08-08, 09:11 PM
Last Post: cncb
  FanArt & displaying a background image Jaggy 2 1,681 2012-01-31, 11:39 PM
Last Post: sub
  Concatenate Name and Subtitle in Pending Recordings Screen Northpole 0 1,170 2011-09-20, 02:54 PM
Last Post: Northpole
  Settings config screen for class IEventNotification plugin imilne 9 3,437 2011-09-17, 06:06 PM
Last Post: sub
  @channelIcon not available in all recording screen options Northpole 2 1,759 2011-07-29, 04:59 PM
Last Post: Northpole
  Skin question - how to centre a list UiList control on screen? McBainUK 2 1,811 2011-02-17, 08:46 AM
Last Post: McBainUK
  SkinHelper fall back to Default ACTCMS 4 1,936 2010-10-31, 03:03 PM
Last Post: ACTCMS
  Force full screen update mvallevand 3 2,091 2010-01-14, 05:11 PM
Last Post: mvallevand
  problems with screen updates from ActivateItem InVermont 2 1,694 2009-03-12, 04:45 PM
Last Post: InVermont
  No (or black) background ACTCMS 5 1,873 2008-02-29, 01:44 AM
Last Post: ACTCMS

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode