<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Map in Safe Area]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1192&amp;type=atom" />
	<updated>2019-05-22T19:13:19Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=1192</id>
		<entry>
			<title type="html"><![CDATA[Re: Map in Safe Area]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5020#p5020" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2019-05-22T19:13:19Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5020#p5020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Map in Safe Area]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=5015#p5015" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Duchess]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=883</uri>
			</author>
			<updated>2019-05-22T16:23:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=5015#p5015</id>
		</entry>
</feed>
