Posted By: FutureRaptor
load bmaps in a function? - 02/26/11 03:24
Hello is there a a way to load bmaps (panels) in functions. Thanks!
Posted By: Widi
Re: load bmaps in a function? - 02/26/11 04:06
set this in your function:
dt_splash_bmp = bmap_createblack(500,45,32);
bmap_fill (dt_splash_bmp,vector(0,0,0),70);
PANEL* my_pan = pan_create ("bmap = dt_splash_bmp; red = 255; green = 0; blue = 0", 102);
dt_splash_bmap: I have problems if i create this pointer inside the function, so i create it outside:
BMAP* dt_splash_bmap;
Maybee another can help here...
Posted By: Uhrwerk
Re: load bmaps in a function? - 02/26/11 18:00
You can create bmaps with bmap_create, and panels with pan_create. If you want to do both in one step you can use:
pan_create ("bmap = \"mybitmap.bmp\";",1337);
Posted By: FutureRaptor
Re: load bmaps in a function? - 02/27/11 04:22
thanks guys but how I can place the bmap (x,y only) using the function. Also I have to be able to change the layer in the function.
Posted By: Uhrwerk
Re: load bmaps in a function? - 02/27/11 16:33
Please be more specific. You can't place a bitmap at all. Placing a panel is simple by changing its pos_x and pos_y values. The layer can be changed by defining it in pan_create. See the manual for more information.
Posted By: FutureRaptor
Re: load bmaps in a function? - 02/27/11 18:39
I meant how to place the panel to a certain position because pos_x and pos_y don't work in functions.
Posted By: hopfel
Re: load bmaps in a function? - 02/27/11 18:52
pos_x and pos_y work perfectly, if not you use it the false way, and for the layer: layer_sort(PANEL*, var layer)
Posted By: Widi
Re: load bmaps in a function? - 02/27/11 19:20
my_pan.pos_x = 500;
Why that don`t work in a function? Works perfectly.