<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Tooltips always on top.]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=482&amp;type=atom" />
	<updated>2017-03-29T12:35:42Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=482</id>
		<entry>
			<title type="html"><![CDATA[Re: Tooltips always on top.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2119#p2119" />
			<content type="html"><![CDATA[<p>Hello.</p><p>By default, tooltips are drawn using the old UI system, so it is located on top of the uGUI elements.<br />To work around this, draw the tooltips using uGUI.<br />Example:<br /><a href="http://infinity-code.com/atlas/online-maps/pages/uGUICustomTooltipForAllMarkersExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2017-03-29T12:35:42Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2119#p2119</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Tooltips always on top.]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=2117#p2117" />
			<content type="html"><![CDATA[<p>Hi!</p><p>I use &quot;Online Maps&quot; to put some 3D markers on the map. Sometimes i need to show tooltips (it may be one or more at one moment) for placed markers (1 tooltip for 1 marker of course).</p><p>The problem is that when i need to show some popup (not GUI), tooltips always show over popup, not behind it.</p><p>There is the code i use to my needs:</p><p>....<br />marker3D.OnDrawTooltip += onCustomMarkerDrawTooltip;<br />....</p><p>void onCustomMarkerDrawTooltip(OnlineMapsMarkerBase marker){</p><p>&nbsp; &nbsp; OnlineMapsMarker3D tmpMarker = marker as OnlineMapsMarker3D;<br />&nbsp; &nbsp; Vector2 screenPosition = OnlineMapsControlBase.instance.GetScreenPosition(tmpMarker.position);<br />&nbsp; &nbsp; GUIContent tip = new GUIContent(tmpMarker.label);<br />&nbsp; &nbsp; Vector2 size = tooltipStyle.CalcSize(tip);<br />&nbsp; &nbsp; GUI.Label(new Rect(screenPosition.x - size.x / 2 - 5, Screen.height - screenPosition.y - size.y - 20, size.x + 10, size.y + 5), tmpMarker.label, tooltipStyle);</p><p>}</p><p>Maybe somebody knows how to put tooltips behind the objects? Thank you!</p>]]></content>
			<author>
				<name><![CDATA[zarcon]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=288</uri>
			</author>
			<updated>2017-03-29T10:26:30Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=2117#p2117</id>
		</entry>
</feed>
