calculator-$5.lzx
<canvas height="500" width="100%">
<resource name="calc_body" src="resources/body.png"/>
<resource name="calc_display" src="resources/display.png"/>
<resource name="button_grn" src="resources/button_green.gif"/>
<resource name="button_red" src="resources/button_red.gif"/>
<resource name="button_blu" src="resources/button_blue.gif"/>
<view name="calculator" resource="calc_body" x="20" y="20">
<view id="display" resource="calc_display" x="20" y="31">
<text name="screen" height="30" width="165" font="displayText" fontsize="25" y="5" x="5">
0
</text>
</view>
<view name="buttons" x="19" y="88">
<simplelayout axis="y" spacing="7"/>
<view name="row2">
<simplelayout axis="x" spacing="7"/>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
7
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
8
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
9
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
*
</text>
</view>
</view>
<view name="row3">
<simplelayout axis="x" spacing="7"/>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
4
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
5
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
6
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="15" valign="middle">
-
</text>
</view>
</view>
<view name="row4">
<simplelayout axis="x" spacing="7"/>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
1
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
2
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
3
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
+
</text>
</view>
</view>
<view name="row5">
<simplelayout axis="x" spacing="7"/>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
0
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="20" fgcolor="#ffffff" x="5" valign="middle">
+/-
</text>
</view>
<view resource="button_blu" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
.
</text>
</view>
<view resource="button_grn" clickable="true" onclick="display.inputDigit( this );">
<text name="buttonText" font="obliqueText" fontsize="30" fgcolor="#ffffff" x="9" valign="middle">
=
</text>
</view>
</view>
</view>
</view>
</canvas>
Cross References
Resources
Named Instances