<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — Map in Safe Area]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1192</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1192&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Map in Safe Area.]]></description>
		<lastBuildDate>Wed, 22 May 2019 19:13:19 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Map in Safe Area]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5020#p5020</link>
			<description><![CDATA[<p>Hello.</p><p>No, there is no way to control it.<br />Just add a white rectangle (image) on UI where the phone bar is located.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Wed, 22 May 2019 19:13:19 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5020#p5020</guid>
		</item>
		<item>
			<title><![CDATA[Map in Safe Area]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5015#p5015</link>
			<description><![CDATA[<p>Hi,</p><p>I resize my map to the full size of the screen safe area but it still occupies space outside the safe area (see attached)</p><p>Is there any way to control this area without resorting to placing a ui panel at the top and loosing the phone info bar? Or is this all because you need to have a margin of map outside the display?</p><div class="codebox"><pre><code>        private void ResizeMap()
        {
            screenWidth = (int)Screen.safeArea.width;
            screenHeight = (int)Screen.safeArea.height;

            int tileSize = 256;

            mapScaledHeight = Mathf.Min(defaultScreenHeight, screenHeight);
            mapScaledWidth = Mathf.Min(defaultScreenWidth, screenWidth);

            int mapWidth = mapScaledWidth / tileSize * tileSize;
            int mapHeight = mapScaledHeight / tileSize * tileSize;

            if (mapScaledWidth % tileSize != 0) mapWidth += tileSize;
            if (mapScaledHeight % tileSize != 0) mapHeight += tileSize;

            OnlineMapsTileSetControl.instance.Resize(mapWidth, mapHeight);

            OnlineMapsCameraOrbit.instance.distance = Mathf.Min(mapScaledHeight, mapScaledWidth) * camDistance;
        }</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Duchess)]]></author>
			<pubDate>Wed, 22 May 2019 16:23:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5015#p5015</guid>
		</item>
	</channel>
</rss>
