|
This is a way to have months displayed as text without needing too many lines of code. Insert the icons into the System Map in chronological order. For example, place "Jan" as icon #21, "Feb" as icon #22 up to "Dec" as icon #32. The example icon files are for Leopard II.
Place a single (64x40) button where you want the month displayed. Check "Draw with hidden border" and leave set for "No Icon".
To display a month, load it into a variable, add the starting icon number less one (E.G. 20 if "Jan" is icon #21) and then set the icon for the required button/object from the variable.
Example code:
IF Month is > January (1) \Get current month
THEN Load Data to: Variable-#0-Tmp \into
ELSE Load Data to: Variable-#0-Tmp \variable.
IF Day of Month is > 0 \Always true,
THEN Variable-#0-Tmp + 20 \offset to 1 before Jan icon.
THEN Touch Object #1 displays Icon# in Variable-#0-Tmp \Set icon to name of month.
Best regards, Rex
|