<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Labels outside map]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2117&amp;type=atom" />
	<updated>2023-05-11T14:52:20Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2117</id>
		<entry>
			<title type="html"><![CDATA[Re: Labels outside map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9023#p9023" />
			<content type="html"><![CDATA[<p>Great! It worked!<br />Thank you.</p>]]></content>
			<author>
				<name><![CDATA[mouta]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2600</uri>
			</author>
			<updated>2023-05-11T14:52:20Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9023#p9023</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Labels outside map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9022#p9022" />
			<content type="html"><![CDATA[<p>If I understand your screenshot correctly, you are using Show Marker Tooltip - Always, and have hidden part of the map using UI element.<br />You can make the map not show tooltip when the marker is under the UI element this way:<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsSupport
{
    public class HideTooltipOverUI : MonoBehaviour
    {
        private static GUIContent content;
        private OnlineMapsControlBase control;

        private void OnDrawTooltip(GUIStyle style, string text, Vector2 position)
        {
            if (Event.current.type != EventType.Repaint) return;
            if (control.IsCursorOnUIElement(position)) return;

            content.text = text;
            Vector2 size = style.CalcSize(content);
            Rect rect = new Rect(position.x - size.x / 2 - 5, Screen.height - position.y - size.y - 20, size.x + 10, size.y + 5);
            style.Draw(rect, content, false, false, false, false);
        }

        private void Start()
        {
            content = new GUIContent();
            OnlineMapsGUITooltipDrawer.OnDrawTooltip += OnDrawTooltip;
            control = OnlineMapsControlBase.instance;
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-05-11T09:34:04Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9022#p9022</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Labels outside map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9021#p9021" />
			<content type="html"><![CDATA[<p>You are right. I uploaded it. <br />Now you can see the label &quot;Player&quot; of the marker still showing.</p>]]></content>
			<author>
				<name><![CDATA[mouta]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2600</uri>
			</author>
			<updated>2023-05-11T08:50:13Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9021#p9021</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Labels outside map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9020#p9020" />
			<content type="html"><![CDATA[<p>Hi.</p><p>Unfortunately, your post has no attachments.<br />The image will be very useful to understand the problem, because the labels should hide outside the map out of the box.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2023-05-10T19:45:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9020#p9020</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Labels outside map]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9019#p9019" />
			<content type="html"><![CDATA[<p>Hi. How can I make markers hide their labels when they are outside the map? I put a printscreen image as an attachment.<br />Thank you.</p>]]></content>
			<author>
				<name><![CDATA[mouta]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2600</uri>
			</author>
			<updated>2023-05-10T15:27:36Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9019#p9019</id>
		</entry>
</feed>
