User Tools

Site Tools


layer:sport_standings

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

layer:sport_standings [2013/08/13 15:15] (current)
david created
Line 1: Line 1:
 +====== Sports Standings Layer ======
  
 +This layer reads a XML file to display a table of standings. Seven rows are shown in addition to the header. You can select images for the background and the rows.
 +
 +You can look at the code below to see how to edit the values. You may find other uses for the layer since the whole 8x3 table can be edited.
 +
 +{{:​layer:​layer-sportstandings-parameters.png?​nolink |}}
 +
 +^ Group ^ Parameter ^ Function ^
 +| Content | Score XML | This is the source to retrieve the scores from. Refer to the code below to see how the file is parsed and download the sample to edit it. |
 +| Transition | Duration | Set the time it takes for all the scores to be shown. |
 +| Appearance | Header Font | You can use the Mac font chooser to adjust how the header text will appear. |
 +| :::        | Body Font   | You can use the Mac font chooser to adjust how the rest of the text will appear. |
 +| :::        | Drop Shadow | Enables options for a drop shadow to be applied on the text. You can set the color, opacity, blur amount and the distance and direction from the text. |
 +| Geometry | Table Width   | This sets how wide the table will be. It adjusts the horizontal scaling of the images in the Background section below. It also impacts the size of the text. |
 +| :::      | Column Inset  | Adjust the inset of each column as a percent of the table'​s width. |
 +| :::      | Row Height ​   | This sets how tall each row will be. It adjusts the vertical scaling of the images in the Background section below. |
 +| :::      | Text Baseline | Adjusts the vertical position of the text within each row. |
 +| :::      | Y Spread ​     | Adjusts the spacing between the rows. |
 +| Background | Table Background | You can choose an image to use as the layer background. It will be scaled to fit. |
 +| :::        | Header Image     | Choose the images to be used for the first row, the odd rows, and the even rows. They are scaled using the width and height parameters above. |
 +| :::        | Odd Row Image    | ::: |
 +| :::        | Even Row Image   | ::: |
 +
 +The default code below is used for the layer when it is first created. You can compare this to the layer to see how the scores are derived from the source file. The layer displays seven team rows.
 +
 +<file xml Standings.xml>​
 +<?xml version="​1.0"?>​
 +<​standings>​
 +<​titleTeamName>​Team</​titleTeamName>​
 +<​titleValue1>​Wins</​titleValue1>​
 +<​titleValue2>​Losses</​titleValue2>​
 +<​teams>​
 + <​team1>​
 + <​name>​Blue Jays</​name>​
 + <​value1>​8</​value1>​
 + <​value2>​2</​value2>​
 + </​team1>​
 + <​team2>​
 + <​name>​Orioles</​name>​
 + <​value1>​7</​value1>​
 + <​value2>​2</​value2>​
 + </​team2>​
 + <​team3>​
 + <​name>​As</​name>​
 + <​value1>​6</​value1>​
 + <​value2>​3</​value2>​
 + </​team3>​
 + <​team4>​
 + <​name>​Angels</​name>​
 + <​value1>​5</​value1>​
 + <​value2>​3</​value2>​
 + </​team4>​
 + <​team5>​
 + <​name>​Brewers</​name>​
 + <​value1>​5</​value1>​
 + <​value2>​5</​value2>​
 + </​team5>​
 + <​team6>​
 + <​name>​Astros</​name>​
 + <​value1>​5</​value1>​
 + <​value2>​6</​value2>​
 + </​team6>​
 + <​team7>​
 + <​name>​Yankees</​name>​
 + <​value1>​3</​value1>​
 + <​value2>​6</​value2>​
 + </​team7>​
 +</​teams>​
 +</​standings>​
 +</​file>​
layer/sport_standings.txt · Last modified: 2013/08/13 15:15 by david