182 lines
9.0 KiB
XML
182 lines
9.0 KiB
XML
<?xml version = "1.0"?>
|
|
|
|
<property name="DrawBounds" access="public" returnType="TinyRect"
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
xsi:noNamespaceSchemaLocation="next.xsd">
|
|
<getter>
|
|
<body>
|
|
<statements>
|
|
<variabledeclaration name="result" initialization="default(TinyRect)"/>
|
|
<variabledeclaration name="screenWidth" initialization="graphics.GraphicsDevice.Viewport.Width"/>
|
|
<variabledeclaration name="screenHeight" initialization="graphics.GraphicsDevice.Viewport.Height"/>
|
|
<if>
|
|
<condition>
|
|
<binaryoperation operator="&&">
|
|
<left>
|
|
<binaryoperation operator="==">
|
|
<left>Env.PLATFORM</left>
|
|
<right>Platform.Android</right>
|
|
</binaryoperation>
|
|
</left>
|
|
<right>
|
|
<binaryoperation operator=">">
|
|
<left>screenHeight</left>
|
|
<right>480</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</binaryoperation>
|
|
</condition>
|
|
<body>
|
|
<statements>
|
|
|
|
<assignment>
|
|
<left>screenWidth</left>
|
|
<right>
|
|
<binaryoperation operator="*">
|
|
<left>screenHeight</left>
|
|
<right>
|
|
<binaryoperation operator="/">
|
|
<left>640f</left>
|
|
<right>480f</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</assignment>
|
|
|
|
</statements>
|
|
</body>
|
|
</if>
|
|
<if>
|
|
<condition>
|
|
<binaryoperation operator="&&">
|
|
<left>
|
|
<binaryoperation operator="!=">
|
|
<left>screenWidth</left>
|
|
<right>0.0</right>
|
|
</binaryoperation>
|
|
</left>
|
|
<right>
|
|
<binaryoperation operator="!=">
|
|
<left>screenHeight</left>
|
|
<right>0.0</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</binaryoperation>
|
|
</condition>
|
|
<body>
|
|
<statements>
|
|
<variabledeclaration name="num3"/>
|
|
<variabledeclaration name="num4"/>
|
|
<variabledeclaration name="test"/>
|
|
<assignment>
|
|
<left>test</left>
|
|
<right>
|
|
<ternaryoperator>
|
|
<condition>
|
|
<binaryoperation operator="==">
|
|
<left>1</left>
|
|
<right>1</right>
|
|
</binaryoperation>
|
|
</condition>
|
|
<iftrue>1</iftrue>
|
|
<iffalse>2</iffalse>
|
|
</ternaryoperator>
|
|
</right>
|
|
</assignment>
|
|
<if>
|
|
<condition>
|
|
<binaryoperation operator="<">
|
|
<left>
|
|
<binaryoperation operator="/">
|
|
<left>screenWidth</left>
|
|
<right>screenHeight</right>
|
|
</binaryoperation>
|
|
</left>
|
|
<right>1.3333333333333333</right>
|
|
</binaryoperation>
|
|
</condition>
|
|
<body>
|
|
<statements>
|
|
<assignment>
|
|
<left>num3</left>
|
|
<right>640.0</right>
|
|
</assignment>
|
|
<assignment>
|
|
<left>num4</left>
|
|
<right>
|
|
<binaryoperation operator="*">
|
|
<left>640.0</left>
|
|
<right>
|
|
<binaryoperation operator="/">
|
|
<left>screenHeight</left>
|
|
<right>screenWidth</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</assignment>
|
|
</statements>
|
|
</body>
|
|
<else>
|
|
<body>
|
|
<statements>
|
|
<assignment>
|
|
<left>num3</left>
|
|
<right>
|
|
<binaryoperation operator="*">
|
|
<left>480.0</left>
|
|
<right>
|
|
<binaryoperation operator="/">
|
|
<left>screenWidth</left>
|
|
<right>screenHeight</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</binaryoperation>
|
|
</right>
|
|
</assignment>
|
|
<assignment>
|
|
<left>num4</left>
|
|
<right>480.0</right>
|
|
</assignment>
|
|
</statements>
|
|
</body>
|
|
|
|
</else>
|
|
</if>
|
|
|
|
<assignment>
|
|
<left>result.LeftX</left>
|
|
<right>0</right>
|
|
</assignment>
|
|
<assignment>
|
|
<left>result.RightX</left>
|
|
<right>
|
|
<typecast type="int">
|
|
<value>num3</value>
|
|
</typecast>
|
|
</right>
|
|
</assignment>
|
|
<assignment>
|
|
<left>result.TopY</left>
|
|
<right>0</right>
|
|
</assignment>
|
|
<assignment>
|
|
<left>result.BottomY</left>
|
|
<right>
|
|
<typecast type="int">
|
|
<value>num4</value>
|
|
</typecast>
|
|
</right>
|
|
</assignment>
|
|
</statements>
|
|
</body>
|
|
</if>
|
|
<return>
|
|
<value>result</value>
|
|
</return>
|
|
</statements>
|
|
</body>
|
|
</getter>
|
|
</property>
|