<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>how to position  file_select_ex  box on screen</title>
		<link>http://www.allegro.cc/forums/view/588473</link>
		<description>Allegro.cc Forum Thread</description>
		<webMaster>matthew@allegro.cc (Matthew Leverton)</webMaster>
		<lastBuildDate>Thu, 09 Nov 2006 17:33:08 +0000</lastBuildDate>
	</channel>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Too many threads for the same element.I&#39;m sorry.</p><p>I want to display the file select box at a particular position on a screen image.</p><p>But it has no parameters to specify the position as can be seen below.</p><p>int file_select_ex(const char *message, char *path, const char *ext, int size, int w, int h);</p><p>pls help.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Thu, 09 Nov 2006 16:51:53 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Snippet from the file selector source code:
</p><div class="source-code snippet"><div class="inner"><pre><span class="c">//--snip--</span>
   stretch_dialog<span class="k2">(</span>file_selector, width, height<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/centre_dialog" target="_blank"><span class="a">centre_dialog</span></a><span class="k2">(</span>file_selector<span class="k2">)</span><span class="k2">;</span>
   <a href="http://www.allegro.cc/manual/set_dialog_color" target="_blank"><span class="a">set_dialog_color</span></a><span class="k2">(</span>file_selector, <a href="http://www.allegro.cc/manual/gui_fg_color" target="_blank"><span class="a">gui_fg_color</span></a>, <a href="http://www.allegro.cc/manual/gui_bg_color" target="_blank"><span class="a">gui_bg_color</span></a><span class="k2">)</span><span class="k2">;</span>
   ret <span class="k3">=</span> <a href="http://www.allegro.cc/manual/popup_dialog" target="_blank"><span class="a">popup_dialog</span></a><span class="k2">(</span>file_selector, FS_EDIT<span class="k2">)</span><span class="k2">;</span>
<span class="c">//--snip--</span>
</pre></div></div><p>
Note the second line. It centres the file selector dialog on the screen. Solution: copy and paste the file selector code to a function of your own and replace centre_dialog() with position_dialog() and call this modified selector instead of the built-in one.
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 09 Nov 2006 16:58:02 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>miran,</p><p>      I&#39;m afraid U have told me this many a times. I did not know where to get the source of file_select_ex(). That&#39;s the problem.</p><p>      Where to find the source of other functions as well.</p><p>      Then I have a infinite loop like this.<br />-----------------------------------------------------------------<br />while(1)<br />    {<br />            <br />           draw_sprite(buffer, opening,x,y);<br />           draw_sprite(screen, buffer, 0, 0);<br />           draw_sprite(screen, exitb, 180, 260);<br />           <br />           draw_sprite(buffer, cursor, mouse_x, mouse_y);<br />                <br />           <br />           ret = file_select_ex(&quot;Pick a file&quot;, fname, &quot;BMP;GIF&quot;, PATH_MAX, 200, 100); <br />           if(ret)<br />           {<br /> //do something</p><p>              }</p><p>          if(mouse clicked on exitb)<br />          {<br /> //do something<br />           }</p><p>}</p><p>--------------------------------------------------</p><p>Here the control directly goes to file_select_ex, the exitb(an exit button image)<br />could not be clicked on. How to fix this. I use an image for cursor at the mouse position. </p><p>Thanks
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Thu, 09 Nov 2006 17:18:13 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><div class="quote_container"><div class="title">Quote:</div><div class="quote"><p>
Where to find the source of other functions as well.
</p></div></div><p>
<a href="http://alleg.sourceforge.net/">http://alleg.sourceforge.net/</a> <img src="http://www.allegro.cc/forums/smileys/rolleyes.gif" alt="::)" />
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 09 Nov 2006 17:22:22 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>I have downloaded this using dev-cpp.</p><p>I have a folder called allegro.</p><p>But could not find the source but only header file gui.h.:-[
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (raja peter)</author>
		<pubDate>Thu, 09 Nov 2006 17:28:58 +0000</pubDate>
	</item>
	<item>
		<description><![CDATA[<div class="mockup v2"><p>Click the fscking link I gave you! Download the fscking source! Stop being a fscking retarded noob!!!
</p></div>]]>
		</description>
		<author>no-reply@allegro.cc (miran)</author>
		<pubDate>Thu, 09 Nov 2006 17:33:08 +0000</pubDate>
	</item>
</rss>
