<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Control menu with Xbox controller in Stingray Forum (Read Only)</title>
    <link>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6260825#M4223</link>
    <description>&lt;P&gt;Similarly, is there a resource like this one:&amp;nbsp;&lt;A href="http://wiki.unity3d.com/index.php/Xbox360Controller" target="_blank"&gt;http://wiki.unity3d.com/index.php/Xbox360Controller&lt;/A&gt; that shows how the Xbox Controller buttons map for the&amp;nbsp;lua player file in Stingray?&lt;/P&gt;</description>
    <pubDate>Fri, 08 Apr 2016 22:15:43 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-04-08T22:15:43Z</dc:date>
    <item>
      <title>Control menu with Xbox controller</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6259922#M4208</link>
      <description>&lt;P&gt;I know I've done this before, but I am completely drawing a blank now. &amp;nbsp;How do I allow for an Xbox controller to conrol the menu to start and exit a game? &amp;nbsp;I feel like it should be in the main_menu.lua file, but I can't figure it out.&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 15:12:07 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6259922#M4208</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-08T15:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Control menu with Xbox controller</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6260825#M4223</link>
      <description>&lt;P&gt;Similarly, is there a resource like this one:&amp;nbsp;&lt;A href="http://wiki.unity3d.com/index.php/Xbox360Controller" target="_blank"&gt;http://wiki.unity3d.com/index.php/Xbox360Controller&lt;/A&gt; that shows how the Xbox Controller buttons map for the&amp;nbsp;lua player file in Stingray?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Apr 2016 22:15:43 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6260825#M4223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-08T22:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Control menu with Xbox controller</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6264717#M4273</link>
      <description>&lt;P&gt;Hello&amp;nbsp;@Anonymous﻿,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I found the following post of yours that was answered by Dan Matlack:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/stingray/lua-script-for-xbox-control/m-p/5907611#M2224" target="_self"&gt;http://forums.autodesk.com/t5/stingray/lua-script-for-xbox-control/m-p/5907611#M2224&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does that cover what you are attempting to do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If not, could you provide more information in regards to what you are looking for.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 22:59:55 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6264717#M4273</guid>
      <dc:creator>santd</dc:creator>
      <dc:date>2016-04-11T22:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Control menu with Xbox controller</title>
      <link>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6264735#M4274</link>
      <description>&lt;P&gt;You can do it by editing the mainmenu.lua file.&amp;nbsp;Scroll to the bottom and add the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;elseif Pad1 and Pad1.active() then
	if Pad1.pressed(stingray.Pad1.button_id(Appkit.Util.plat(nil, "a", nil, "cross"))) then MainMenu.action = "start"
	elseif Pad1.pressed(stingray.Pad1.button_id(Appkit.Util.plat(nil, "y", nil, "triangle"))) then MainMenu.action = "exit"
	end
end&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here it is in context:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if MainMenu.action == nil  then
	local time = stingray.World.time(SimpleProject.world)
	local p = stingray.Application.platform()
	if time - start_time &amp;gt; 1 then
		if Appkit.Util.is_pc() then
			if stingray.Keyboard.pressed(stingray.Keyboard.button_id("1")) then MainMenu.action = "start"
			elseif stingray.Keyboard.pressed(stingray.Keyboard.button_id("esc")) then MainMenu.action = "exit"
&lt;FONT color="#0000FF"&gt;&lt;STRONG&gt;			elseif Pad1 and Pad1.active() then
				if Pad1.pressed(stingray.Pad1.button_id(Appkit.Util.plat(nil, "a", nil, "cross"))) then MainMenu.action = "start"
				elseif Pad1.pressed(stingray.Pad1.button_id(Appkit.Util.plat(nil, "y", nil, "triangle"))) then MainMenu.action = "exit"
				end
    			end&lt;/STRONG&gt;&lt;/FONT&gt;
    		end
	end
end&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Apr 2016 23:24:17 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/stingray-forum-read-only/control-menu-with-xbox-controller/m-p/6264735#M4274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-04-11T23:24:17Z</dc:date>
    </item>
  </channel>
</rss>

