<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>Mouse wheel in allegro</title>
		<link>http://www.allegro.cc/forums/view/587597</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Sun, 17 Sep 2006 18:23:35 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Is there a way (or rather, a specific function), that would let me use the mouse wheel in my program (And detect if it&#39;s been &quot;scrolled&quot;)? I&#39;m coding a scrollable list of elements, and it would be nice if I could scroll it using said wheel.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Sun, 17 Sep 2006 15:52:36 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p><span class="source-code"><a href="http://www.allegro.cc/manual/mouse_z" target="_blank"><span class="a">mouse_z</span></a></span> is your friend.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (Thomas Fjellstrom)</author>
		<pubDate>Sun, 17 Sep 2006 15:54:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Check out mouse_z, I believe that deals with the wheel. <a href="http://allegro.cc/manual/api/mouse-routines/">http://allegro.cc/manual/api/mouse-routines/</a></p><p>Edit: 2 seconds late!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (SonShadowCat)</author>
		<pubDate>Sun, 17 Sep 2006 15:54:33 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>There is a variable called mouse_z thats value changes when wheel is scrolled.</p><p>[edit]<br />Three minutes late because I thought there was some kind of longer explanation about it in manual but seems there isn&#39;t
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (HoHo)</author>
		<pubDate>Sun, 17 Sep 2006 15:57:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Oh well, it would be much more readable if it would be called mouse_wheel, but I guess it&#39;ll have to do. One other thing, is there something like get_mouse_mickeys() which returns the wheel movement, or do I have to code it myself (I&#39;m lazy, I know <img src="http://www.allegro.cc/forums/smileys/tongue.gif" alt=":P" />)?
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (CursedTyrant)</author>
		<pubDate>Sun, 17 Sep 2006 16:01:03 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Maybe something like this
</p><div class="source-code snippet"><div class="inner"><pre><span class="k1">void</span> get_mouse_mickeys_ex<span class="k2">(</span><span class="k1">int</span> <span class="k3">*</span>mickeyx, <span class="k1">int</span> <span class="k3">*</span>mickeyy, <span class="k1">int</span> <span class="k3">*</span>mickeyz<span class="k2">)</span>
<span class="k2">{</span>
  <a href="http://www.allegro.cc/manual/get_mouse_mickeys" target="_blank"><span class="a">get_mouse_mickeys</span></a><span class="k2">(</span>mickeyx,mickeyy<span class="k2">)</span><span class="k2">;</span>
  <span class="k1">static</span> <span class="k1">int</span> mz <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_z" target="_blank"><span class="a">mouse_z</span></a><span class="k2">;</span>
  <span class="k1">if</span><span class="k2">(</span><a href="http://www.allegro.cc/manual/mouse_z" target="_blank"><span class="a">mouse_z</span></a> <span class="k3">!</span><span class="k3">=</span> mz<span class="k2">)</span>
    <span class="k3">*</span>mickeyz <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_z" target="_blank"><span class="a">mouse_z</span></a> <span class="k3">-</span> mz<span class="k2">;</span>
  <span class="k1">else</span>
    <span class="k3">*</span>mickeyz <span class="k3">=</span> <span class="n">0</span><span class="k2">;</span>
  mz <span class="k3">=</span> <a href="http://www.allegro.cc/manual/mouse_z" target="_blank"><span class="a">mouse_z</span></a><span class="k2">;</span>
<span class="k2">}</span>
</pre></div></div><p>

Havent tested it, probably not thinking straight either because I just woke up, use it at your own risk <img src="http://www.allegro.cc/forums/smileys/grin.gif" alt=";D" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (ixilom)</author>
		<pubDate>Sun, 17 Sep 2006 18:23:35 +0000</pubDate>
	</item>
</rss>
