Seitenhierarchie

  Wiki Navigation

    Loading...


 Recently Updated


 Latest Releases

 MediaPortal 1.32
            Releasenews | Download
 MediaPortal 2.5
            Releasenews | Download


Introduction!MediaPortalWidgets.png!

This plugin is designed to offer new MediaPortal skinnable controls. These controls are used in MediaPortal skins and offer the following benefits:

  • Enhancing the user experience of the MediaPortal.
  • Improving the ability of skin developers to build and maintain skins.
  • Ability to extend the MediaPortal GUI control set without altering the core MediaPortal source code.

Available controls:

  1. Analog Clock - a skinnable analog clock widget in either 12 or 24 hour format.

Plugin Type

This is a MediaPortal Window plugin.

Development Status

This plugin is designed to be in continuous development; new controls may be added to enhance the overall usability of MediaPortal.

Requirements

  • Requires MediaPortal 1.0.0.0+ although some widgets in this plugin may work with earlier versions of MediaPortal

Download

MediaPortal Widgets Plugin Release Forum Thread

Installation

  1. Place the MediaPortalWidgets.dll in the MediaPortal Windows plugins directory.

Configuration

To enable or disable this plugin and access it's configuration menu, see MediaPortal Setup Plugins. There is presently no plugin specific configuration menu.

Usage Guide

Each control in the plugin has its own usage. Controls do not depend on each other unless otherwise stated.

Analog Clock

This control draws an analog clock. It offers skinners a number of options to control the look and functionality of the clock.

Clock Textures

These textures are rendered in the order presented below; the face is on the bottom, the cover is on the top. The value of each attribute must be a string that represents the file name of the texture; the texture file must be placed in the skin Media folder.

  • textureFace - the face of the clock
  • textureHourHand - the clock hour hand
  • textureMinuteHand - the clock minute hand
  • textureSecondHand - the clock second hand
  • textureCover - the cover for the clock; e.g., a glass overlay

When creating the hour, minute, and second hand textures consider the following rules for successful outcomes.

  • Each hand texture is a rectangle that is rendered with is geometric center over the handOriginX, handOriginY.
  • The hand should (generally) only occupy one half of the total hand texture rectangle. An exception to this is if the hand has a "tail".
  • The hand texture should be designed with its orientation at the 12 o'clock position.
  • The hand texture should be created with a transparent background.

Clock Geometry

These attributes help to control the layout for the clock.

  • handOriginX - the x position in the window for the clock hands center of rotation. The default is -1 (compute the origin x to be at the center of the clock face texture.
  • handOriginY - the y position in the window for the clock hands center of rotation. The default is -1 (compute the origin y to be at the center of the clock face texture.
  • handScale - the scaling factor (as a percentage) to apply to each of the clock hands. The default is 100 percent. Use values less than 100 to reduce the size of the clock hands or greater than 100 enlarge the size of the clock hands. This attribute is useful for tuning the size of the hands to the size most appropriate for the chosen clock face.

Note: If either the handOriginX or the handOriginY is less than 0 then the hand origin is computed to be at the center of the clock face texture.

Clock Options

  • sweepSecondHand - specifies whether or not the second hand snaps to the next second or moves smoothly to the next second. The default is "no" (snap to the next second).
  • clock24Hour - specifies whether the clock is a 12 hour or 24 hour clock. The default is "no" (compute for a 12 hour clock).

Clock example in skin xml file

  <control>
     <description>analog clock</description>
     <type>analogClock</type>
     <posX>300</posX>
     <posY>300</posY>
     <width>250</width>
     <height>250</height>
     <colordiffuse>FFFFFFFF</colordiffuse>
     <textureFace>clockFace1.png</textureFace>
     <textureHourHand>clockHandHour1.png</textureHourHand>
     <textureMinuteHand>clockHandMinute1.png</textureMinuteHand>
     <textureSecondHand>clockHandSecond1.png</textureSecondHand>
     <textureCover>-</textureCover>
     <handOriginX>-1</handOriginX>
     <handOriginY>-1</handOriginY>
     <handScale>40</handScale>
     <sweepSecondHand>yes</sweepSecondHand>
     <clock24Hour>no</clock24Hour>
   </control>
   <control>
     <description>analog clock</description>
     <type>analogClock</type>
     <posX>600</posX>
     <posY>300</posY>
     <width>50</width>
     <height>50</height>
     <colordiffuse>FFFFFFFF</colordiffuse>
     <textureFace>clockFace2.png</textureFace>
     <textureHourHand>clockHandHour2.png</textureHourHand>
     <textureMinuteHand>clockHandMinute2.png</textureMinuteHand>
     <textureSecondHand>-</textureSecondHand>
     <textureCover>-</textureCover>
     <handOriginX>-1</handOriginX>
     <handOriginY>-1</handOriginY>
     <handScale>58</handScale>
     <sweepSecondHand>no</sweepSecondHand>
     <clock24Hour>no</clock24Hour>
   </control>
   <control>
     <description>analog clock</description>
     <type>analogClock</type>
     <posX>700</posX>
     <posY>300</posY>
     <width>250</width>
     <height>250</height>
     <colordiffuse>FFFFFFFF</colordiffuse>
     <textureFace>clockFace3.png</textureFace>
     <textureHourHand>clockHandHour3.png</textureHourHand>
     <textureMinuteHand>clockHandMinute3.png</textureMinuteHand>
     <textureSecondHand>clockHandSecond3.png</textureSecondHand>
     <textureCover>clockCover3.png</textureCover>
     <handOriginX>-1</handOriginX>
     <handOriginY>-1</handOriginY>
     <handScale>28</handScale>
     <sweepSecondHand>no</sweepSecondHand>
     <clock24Hour>yes</clock24Hour>
   </control>

Change Log

  • Version 1.0.0.0 - Jan. 5, 2010
    • Initial release
  • Version 1.0.1.0 - Mar. 17, 2011
    • Updated to work with MP plugin version check requirements

Known Problems / Troubleshooting

  • None

Todo list

  • None

Author(s)

Andy Phillipson (ajp8164)

License

GNU Public License

See Also

  • MediaPortal forums

Discussion / Support

Forum discussion

   

 

This page has no comments.