How to show a menu picture? (1 Viewer)

STSC

Portal Pro
December 4, 2004
139
0
Germany
Hello,

I have a small question. When you are in the home screen you can see the changing menu pictures when you are scrolling through the menu entries.
How can I implement this in my MP Plugin.

My skin file looks like this:

Code:
- <window>
  <id>558</id> 
  <defaultcontrol>2</defaultcontrol> 
  <allowoverlay>yes</allowoverlay> 
  <define>#header.image:television_logo.png</define> 
  <define>#header.label:PVR Scheduler</define> 
  <define>#header.hover:hover_my tv.png</define> 
- <controls>
  <import>common.window.xml</import> 
- <control>
  <description>Date</description> 
  <type>label</type> 
  <id>200</id> 
  <posX>690</posX> 
  <posY>30</posY> 
  <label>#date</label> 
  <align>right</align> 
  <font>font13</font> 
  <textcolor>ffa9d0f7</textcolor> 
  </control>

....

How can I make the hover_my tv.png picture visible in the Home Screen when I scroll to my Window Plugin?

Thanks
 

xavier

MP Donator
  • Premium Supporter
  • December 12, 2004
    121
    17
    Venice
    Home Country
    Italy Italy
    Hello STSC,

    STSC said:
    How can I make the hover_my tv.png picture visible in the Home Screen when I scroll to my Window Plugin?

    Try this in the SetupForm.cs of your plugin:

    Code:
    /// <summary>
    /// If the plugin should have its own button on the home screen then it
    /// should return true to this method, otherwise if it should not be on home
    /// it should return false
    /// </summary>
    /// <param name="strButtonText">text the button should have</param>
    /// <param name="strButtonImage">image for the button, or empty for default</param>
    /// <param name="strButtonImageFocus">image for the button, or empty for default</param>
    /// <param name="strPictureImage">subpicture for the button or empty for none</param>
    /// <returns>true  : plugin needs its own button on home
    ///          false : plugin does not need its own button on home</returns>
    
    public bool GetHome(out string strButtonText, out string strButtonImage, out string strButtonImageFocus, out string strPictureImage) 
    	{
    		strButtonText = GUILocalizeStrings.Get(nnn);	//Put your button string here
    		strButtonImage = "";
    		strButtonImageFocus = "";
    		strPictureImage = "hover_my alarm.png";		//Put your hover image here
    		return true;
    	}
    Best regards,
    xavier.
     

    Users who are viewing this thread

    Top Bottom