Hi! I'm developing a skin named metroportal
i've created 5 windows plugins (blank) to create categories in the basic home screen but i can't use the play button on them: fanart works but the button doesn't start the movie (in this case, i've done one another for tv series and one for music they all doesn't work...)
here are the codes:
button code:
skin code:
plugin code
do I need to add/modify something?
Thank u all!
i've created 5 windows plugins (blank) to create categories in the basic home screen but i can't use the play button on them: fanart works but the button doesn't start the movie (in this case, i've done one another for tv series and one for music they all doesn't work...)
here are the codes:
button code:
Code:
<control>
<description>Play Button</description>
<type>button</type>
<id>91919991</id>
<onleft>991</onleft>
<onright>91919992</onright>
<onup>894</onup>
<ondown>10</ondown>
<posX>567</posX>
<posY>220</posY>
<width>300</width>
<height>300</height>
<font>font0</font>
<textureFocus>greyplay.png</textureFocus>
<textureNoFocus>grey.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<disabledcolor>00ffffff</disabledcolor>
<label>-</label>
<textXOff>4</textXOff>
<textYOff>3</textYOff>
<animation effect="Fade" time="300">Focus</animation>
<animation effect="Fade" time="300">UnFocus</animation>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
skin code:
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<window>
<id>5777</id>
<defaultcontrol>991</defaultcontrol>
<allowoverlay>yes</allowoverlay>
<disabletopbar>no</disabletopbar>
<rememberLastFocusedControl>yes</rememberLastFocusedControl>
<controls>
<import>common.Metro.menu.bar.xml</import>
<control>
<id>0</id>
<description>moviefanart</description>
<type>image</type>
<posX>450</posX>
<posY>220</posY>
<width>534</width>
<height>300</height>
<texture mask="basicfanartmask.png">#latestMediaHandler.movingpicture.latest1.fanart</texture>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>0</id>
<description>moviefanart</description>
<type>image</type>
<posX>813</posX>
<posY>372</posY>
<width>264</width>
<height>148</height>
<texture mask="minimask.png">#latestMediaHandler.movingpicture.latest3.fanart</texture>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>0</id>
<description>moviefanart</description>
<type>image</type>
<posX>813</posX>
<posY>220</posY>
<width>264</width>
<height>148</height>
<texture mask="minimask.png">#latestMediaHandler.movingpicture.latest2.fanart</texture>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>991</id>
<description>moving pictures</description>
<type>button</type>
<onleft>91919991</onleft>
<onright>996</onright>
<onup>894</onup>
<ondown>993</ondown>
<posX>262</posX>
<posY>220</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<hyperlink>96742</hyperlink>
<textureFocus>hover_moving pictures.png</textureFocus>
<textureNoFocus>basichome\hover_moving pictures.png</textureNoFocus>
<textcolor>00000000</textcolor>
<textcolorNoFocus>00000000</textcolorNoFocus>
<label>moving pictures</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
<animation effect="Zoom" end="105,105" start="100,100" time="300">Focus</animation>
<animation effect="Zoom" end="100,100" start="105,105" time="300">UnFocus</animation>
</control>
<control>
<id>993</id>
<description>videosbutt</description>
<type>button</type>
<onleft>998</onleft>
<onright>994</onright>
<onup>991</onup>
<ondown>10</ondown>
<posX>262</posX>
<posY>372</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<hyperlink>6</hyperlink>
<textureFocus>hover_my videos.png</textureFocus>
<textureNoFocus>basichome\hover_my videos.png</textureNoFocus>
<textcolor>00000000</textcolor>
<textcolorNoFocus>00000000</textcolorNoFocus>
<label>videos</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
<animation effect="Zoom" end="105,105" start="100,100" time="300">Focus</animation>
<animation effect="Zoom" end="100,100" start="105,105" time="300">UnFocus</animation>
</control>
<control>
<id>996</id>
<description>infoservice butt</description>
<type>button</type>
<onleft>995</onleft>
<onright>91919991</onright>
<onup>894</onup>
<ondown>998</ondown>
<posX>415</posX>
<posY>220</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<hyperlink>4755</hyperlink>
<textureFocus>hover_my trailers.png</textureFocus>
<textureNoFocus>basichome\hover_my trailers.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<label>trailers imdb</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
<animation effect="Zoom" end="105,105" start="100,100" time="300">Focus</animation>
<animation effect="Zoom" end="100,100" start="105,105" time="300">UnFocus</animation>
</control>
<control>
<id>998</id>
<description>plugins button</description>
<type>button</type>
<onleft>993</onleft>
<onright>91919991</onright>
<onup>993</onup>
<ondown>10</ondown>
<posX>415</posX>
<posY>372</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<hyperlink>7986</hyperlink>
<textureFocus>hover_Films.png</textureFocus>
<textureNoFocus>basichome\hover_Films.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<label>my films</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
<animation effect="Zoom" end="105,105" start="100,100" time="300">Focus</animation>
<animation effect="Zoom" end="100,100" start="105,105" time="300">UnFocus</animation>
</control>
<control>
<description>Play Button</description>
<type>button</type>
<id>91919991</id>
<onleft>991</onleft>
<onright>91919992</onright>
<onup>894</onup>
<ondown>10</ondown>
<posX>567</posX>
<posY>220</posY>
<width>300</width>
<height>300</height>
<font>font0</font>
<textureFocus>greyplay.png</textureFocus>
<textureNoFocus>grey.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<disabledcolor>00ffffff</disabledcolor>
<label>-</label>
<textXOff>4</textXOff>
<textYOff>3</textYOff>
<animation effect="Fade" time="300">Focus</animation>
<animation effect="Fade" time="300">UnFocus</animation>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>91919992</id>
<description>Play Button</description>
<type>button</type>
<onleft>91919991</onleft>
<onright>991</onright>
<onup>894</onup>
<ondown>91919993</ondown>
<posX>871</posX>
<posY>220</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<hyperlink>91919991</hyperlink>
<textureFocus>greyplay.png</textureFocus>
<textureNoFocus>grey.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<disabledcolor>00ffffff</disabledcolor>
<label>-</label>
<textXOff>4</textXOff>
<textYOff>3</textYOff>
<animation effect="Fade" time="300">Focus</animation>
<animation effect="Fade" time="300">UnFocus</animation>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>91919993</id>
<description>Play Button</description>
<type>button</type>
<onleft>91919991</onleft>
<onright>996</onright>
<onup>91919992</onup>
<ondown>10</ondown>
<posX>871</posX>
<posY>372</posY>
<width>148</width>
<height>148</height>
<font>font0</font>
<textureFocus>greyplay.png</textureFocus>
<textureNoFocus>grey.png</textureNoFocus>
<textcolor>00ffffff</textcolor>
<textcolorNoFocus>00ffffff</textcolorNoFocus>
<disabledcolor>00ffffff</disabledcolor>
<label>-</label>
<textXOff>4</textXOff>
<textYOff>3</textYOff>
<animation effect="Fade" time="300">Focus</animation>
<animation effect="Fade" time="300">UnFocus</animation>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>0</id>
<description>lastserie1</description>
<type>fadelabel</type>
<posX>867</posX>
<posY>464</posY>
<width>270</width>
<font>font32</font>
<align>RIGHT</align>
<label>#latestMediaHandler.movingpicture.latest1.title</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>0</id>
<description>lastserie1</description>
<type>fadelabel</type>
<posX>1019</posX>
<posY>494</posY>
<width>148</width>
<font>font15</font>
<align>RIGHT</align>
<label>#latestMediaHandler.movingpicture.latest3.title</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
<control>
<id>0</id>
<description>lastserie1</description>
<type>fadelabel</type>
<posX>1019</posX>
<posY>342</posY>
<width>148</width>
<font>font15</font>
<align>RIGHT</align>
<label>#latestMediaHandler.movingpicture.latest2.title</label>
<animation effect="Fade" time="500">WindowClose</animation>
<animation effect="Fade" time="500">WindowOpen</animation>
</control>
</controls>
</window>
plugin code
Code:
using System;
using System.Windows.Forms;
using MediaPortal.GUI.Library;
using MediaPortal.Dialogs;
namespace MP.Home._2
{
public class Class1 : GUIWindow, ISetupForm
{
public Class1()
{
}
#region ISetupForm Members
// Returns the name of the plugin which is shown in the plugin menu
public string PluginName()
{
return "MetroHome2";
}
// Returns the description of the plugin is shown in the plugin menu
public string Description()
{
return "Second basic home page in MetroPortal";
}
public override bool Init()
{
return Load(GUIGraphicsContext.Skin + @"\Metro.portal.home.2.xml");
}
// Returns the author of the plugin which is shown in the plugin menu
public string Author()
{
return "Bombus";
}
// show the setup dialog
public void ShowPlugin()
{
MessageBox.Show("Nothing to configure there will be a special exe to do this ;)");
}
// Indicates whether plugin can be enabled/disabled
public bool CanEnable()
{
return true;
}
// Get Windows-ID
public int GetWindowId()
{
// WindowID of windowplugin belonging to this setup
// enter your own unique code
return 5777;
}
// Indicates if plugin is enabled by default;
public bool DefaultEnabled()
{
return true;
}
// indicates if a plugin has it's own setup screen
public bool HasSetup()
{
return true;
}
/// <summary>
/// If the plugin should have it's own button on the main menu of MediaPortal 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 it's own button on home
/// false : plugin does not need it's own button on home</returns>
public bool GetHome(out string strButtonText, out string strButtonImage,
out string strButtonImageFocus, out string strPictureImage)
{
strButtonText = String.Empty;
strButtonImage = String.Empty;
strButtonImageFocus = String.Empty;
strPictureImage = String.Empty;
return false;
}
// With GetID it will be an window-plugin / otherwise a process-plugin
// Enter the id number here again
public override int GetID
{
get
{
return 5777;
}
set
{
}
}
#endregion
}
}
do I need to add/modify something?
Thank u all!