<?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 — Right Click Function for Marker or Drawing??]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=1992</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=1992&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Right Click Function for Marker or Drawing??.]]></description>
		<lastBuildDate>Mon, 27 Jun 2022 08:49:07 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Right Click Function for Marker or Drawing??]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8419#p8419</link>
			<description><![CDATA[<p>Hello.</p><p>Good question. I never thought about it.</p><p>Something like that:<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsSupport
{
    public class RightClickOnInteractiveElement : MonoBehaviour
    {
        private bool isRightPressed = false;
        private IOnlineMapsInteractiveElement pressedElement;

        private void OnRightClick(IOnlineMapsInteractiveElement element)
        {
            Debug.Log(&quot;OnRightClick&quot;);
        }

        private void OnRightPress(IOnlineMapsInteractiveElement element)
        {
            Debug.Log(&quot;OnRightPress&quot;);
        }

        private void OnRightRelease(IOnlineMapsInteractiveElement element)
        {
            Debug.Log(&quot;OnRightRelease&quot;);
        }

        private void Update()
        {
            bool rightPresses = Input.GetMouseButton(1);
            if (rightPresses == isRightPressed) return;

            isRightPressed = rightPresses;
            Vector2 inputPosition = OnlineMapsControlBase.instance.GetInputPosition();
            IOnlineMapsInteractiveElement element = OnlineMapsControlBase.instance.GetInteractiveElement(inputPosition);
            if (element == null) return;

            if (rightPresses)
            {
                pressedElement = element;
                OnRightPress(element);
            }
            else
            {
                OnRightRelease(element);
                if (pressedElement == element) OnRightClick(element);
                pressedElement = null;
            }
        }
    }
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 27 Jun 2022 08:49:07 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8419#p8419</guid>
		</item>
		<item>
			<title><![CDATA[Right Click Function for Marker or Drawing??]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=8417#p8417</link>
			<description><![CDATA[<p>Is there a right click function for marker or Drawing???</p>]]></description>
			<author><![CDATA[null@example.com (moonflow123)]]></author>
			<pubDate>Mon, 27 Jun 2022 04:13:24 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=8417#p8417</guid>
		</item>
	</channel>
</rss>
