Too many threads for the same element.I'm sorry.
I want to display the file select box at a particular position on a screen image.
But it has no parameters to specify the position as can be seen below.
int file_select_ex(const char *message, char *path, const char *ext, int size, int w, int h);
pls help.
Snippet from the file selector source code:
//--snip-- stretch_dialog(file_selector, width, height); centre_dialog(file_selector); set_dialog_color(file_selector, gui_fg_color, gui_bg_color); ret = popup_dialog(file_selector, FS_EDIT); //--snip--
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.
miran,
I'm afraid U have told me this many a times. I did not know where to get the source of file_select_ex(). That's the problem.
Where to find the source of other functions as well.
Then I have a infinite loop like this.
-----------------------------------------------------------------
while(1)
{
draw_sprite(buffer, opening,x,y);
draw_sprite(screen, buffer, 0, 0);
draw_sprite(screen, exitb, 180, 260);
draw_sprite(buffer, cursor, mouse_x, mouse_y);
ret = file_select_ex("Pick a file", fname, "BMP;GIF", PATH_MAX, 200, 100);
if(ret)
{
//do something
}
if(mouse clicked on exitb)
{
//do something
}
}
--------------------------------------------------
Here the control directly goes to file_select_ex, the exitb(an exit button image)
could not be clicked on. How to fix this. I use an image for cursor at the mouse position.
Thanks
Where to find the source of other functions as well.
I have downloaded this using dev-cpp.
I have a folder called allegro.
But could not find the source but only header file gui.h.:-[
Click the fscking link I gave you! Download the fscking source! Stop being a fscking retarded noob!!!