﻿// we assume that the data for the tile display
// is contained in the structured variable V[tile]:
 
// "image" is the image file for the tile, white background
// "value" is the number to be shown on the tile
// "valuecolor" is the color in which the number is shown
// "link" is the action to be executed when the user clicks the tile


Image	(0,1) (7,21)	"&V[tile.image]" -plain -nostretch  _
    input="&V[tile.link]"

// calculate offset for right-aligned value output
Set V[offset] "&V[tile.value]" -charcount 
Set V[offset] &V[offset] * 19
Set V[offset] 104 -  &V[offset] 


// display value
Image	(3,5) (5,21)	"white.res" -plain  _
    textstring="&V[tile.value]" textheight=48 textweight=8 _
    textfont="Calibri"  textcolor="&V[tile.valuecolor]"  _
    textarea=(&V[offset],0)  _
    input="&V[tile.link]"