<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Maratis forum - Making menus]]></title>
	<link rel="self" href="http://forum.maratis3d.com/extern.php?action=feed&amp;tid=561&amp;type=atom"/>
	<updated>2013-01-21T17:02:39Z</updated>
	<generator>PunBB</generator>
	<id>http://forum.maratis3d.com/viewtopic.php?id=561</id>
		<entry>
			<title type="html"><![CDATA[Re: Making menus]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3538#p3538"/>
			<content type="html"><![CDATA[<p>That&#039;s perfect.</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2013-01-21T17:02:39Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3538#p3538</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Making menus]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3532#p3532"/>
			<content type="html"><![CDATA[<p>Hi,</p><p>you should use your variable inventory in a different way :</p><div class="codebox"><pre><code>inventory = false

function onSceneUpdate()

    if onKeyDown(&quot;I&quot;) then
        inventory = not inventory -- set inventory to it&#039;s reverse
    end

    if inventory == true then
        setText(text_inv, &quot;Inventory: &quot;)
    else
        setText(text_inv, &quot;nothing&quot;)
    end

end</code></pre></div>]]></content>
			<author>
				<name><![CDATA[anael]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=2</uri>
			</author>
			<updated>2013-01-21T07:51:36Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3532#p3532</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Making menus]]></title>
			<link rel="alternate" href="http://forum.maratis3d.com/viewtopic.php?pid=3529#p3529"/>
			<content type="html"><![CDATA[<p>Hey, Is there some easy way to redo this?</p><p>When I make menus I write:</p><p>function onSceneUpdate()</p><p>if onKeyDown(&quot;I&quot;) or inventory == true then </p><p>setText(text_inv, &quot;Inventory: &quot;)</p><p>end</p><p>end</p><p>But in order to make it pop away by pressing the same key I&#039;m thinking I could write:</p><p>function onSceneUpdate()</p><p>if onKeyDown(&quot;I&quot;) or inventory == true then </p><p>setText(text_inv, &quot;Inventory: &quot;)</p><p>&nbsp; &nbsp; &nbsp; if onKeyDown(&quot;I&quot;) then<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; inventory = false<br />&nbsp; &nbsp; &nbsp;<br />&nbsp; &nbsp; &nbsp; end</p><p>end</p><p>end</p><p>But I can&#039;t since it doesn&#039;t sense that I&#039;m pressing I once. And it goes directly onto the next function and says it&#039;s false vice versa and the menu just stays on all the time (nothing happens). </p><p>Is there some better way to do it? I want to be able to use the same key while in menus.</p><p>Pär</p>]]></content>
			<author>
				<name><![CDATA[Pär]]></name>
				<uri>http://forum.maratis3d.com/profile.php?id=1252</uri>
			</author>
			<updated>2013-01-20T23:39:49Z</updated>
			<id>http://forum.maratis3d.com/viewtopic.php?pid=3529#p3529</id>
		</entry>
</feed>
