<?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 — Setting marker texture causes alignment issues]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1412</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1412&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Setting marker texture causes alignment issues.]]></description>
		<lastBuildDate>Mon, 13 Jan 2020 09:19:36 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Setting marker texture causes alignment issues]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5860#p5860</link>
			<description><![CDATA[<p>I tested both of your ways and still cannot reproduce the problem.<br />If possible, send a scene (as a package) that has a problem to me (support@infinity-code.com) for testing.</p><p>To make it clear:<br />I do not need your working project.<br />I need any scene where this problem is appears.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 13 Jan 2020 09:19:36 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5860#p5860</guid>
		</item>
		<item>
			<title><![CDATA[Re: Setting marker texture causes alignment issues]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5857#p5857</link>
			<description><![CDATA[<p>Sorry, I forgot to specify that this issue is encountered when adding the markers through code.</p><p>Here&#039;s an example</p><div class="codebox"><pre><code>zoomedInCenterMarker = new OnlineMapsMarker {
            align = OnlineMapsAlign.Center,
            range = new OnlineMapsRange(min: MapSetupUIHandler.Instance.cacheRegionEditZoomLevel, max: OnlineMaps.MAXZOOM),
            OnDrag = delegate (OnlineMapsMarkerBase marker) { OnCenterMarkerDragged(); },
            texture = MapSetupUIHandler.Instance.editCenterTexture
        };
        OnlineMapsMarkerManager.AddItem(zoomedInCenterMarker);</code></pre></div><p>Yields the top image in the attachment when combined with other markers which have had the texture set after AddItem has been called. You can see the center marker has been aligned such that the top left of the image is in the center, despite the code specifying that it should be centered.</p><div class="codebox"><pre><code>zoomedInCenterMarker = new OnlineMapsMarker {
            align = OnlineMapsAlign.Center,
            range = new OnlineMapsRange(min: MapSetupUIHandler.Instance.cacheRegionEditZoomLevel, max: OnlineMaps.MAXZOOM),
            OnDrag = delegate (OnlineMapsMarkerBase marker) { OnCenterMarkerDragged(); },
            //texture = MapSetupUIHandler.Instance.editCenterTexture
        };
        OnlineMapsMarkerManager.AddItem(zoomedInCenterMarker);
        zoomedInCenterMarker.texture = MapSetupUIHandler.Instance.editCenterTexture;</code></pre></div><p>When the texture is set after the issue is corrected, see the bottom image (no other code changes have occurred).</p>]]></description>
			<author><![CDATA[null@example.com (Chootin)]]></author>
			<pubDate>Mon, 13 Jan 2020 07:10:55 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5857#p5857</guid>
		</item>
		<item>
			<title><![CDATA[Re: Setting marker texture causes alignment issues]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5832#p5832</link>
			<description><![CDATA[<p>Hello.</p><p>Thank you for the bug report.<br />Unfortunately, I could not reproduce the problem.<br />Video:<br /><a href="https://www.dropbox.com/s/lk72rj8xx0miwg1/ScreenRecorderProject34.mp4?dl=0">https://www.dropbox.com/s/lk72rj8xx0miw … 4.mp4?dl=0</a><br />I missed something?</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Tue, 10 Dec 2019 09:42:06 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5832#p5832</guid>
		</item>
		<item>
			<title><![CDATA[Setting marker texture causes alignment issues]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=5828#p5828</link>
			<description><![CDATA[<p>Setting the texture of a marker before it is added to a map causes that marker to always align to the top left corner, rather than the specified alignment.</p><p>The alignment works correctly if you add the marker to the map first, then update the texture.</p>]]></description>
			<author><![CDATA[null@example.com (Chootin)]]></author>
			<pubDate>Tue, 10 Dec 2019 02:11:35 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=5828#p5828</guid>
		</item>
	</channel>
</rss>
