![]() |
|
can i set bg img for a dialog |
raja peter
Member #7,835
October 2006
|
hi, can i set a background image(a bmp or gif) as the background of dialog and display other elements(dialogs) on it. I tried d_bitmap_proc, but could not draw other objects on it. thanks. luv, raja |
James Stanley
Member #7,275
May 2006
![]() |
Is the d_bitmap_proc the first item declared in your dialogue? |
type568
Member #8,381
March 2007
![]() |
void blit(BITMAP *source, BITMAP *dest, int source_x, int source_y, int dest_x, int dest_y, int width, int height); Copies a rectangular area of the source bitmap to the destination bitmap. The source_x and source_y parameters are the top left corner of the area to copy from the source bitmap, and dest_x and dest_y are the corresponding position in the destination bitmap. This routine respects the destination clipping rectangle, and it will also clip if you try to blit from areas outside the source bitmap.
|
spellcaster
Member #1,493
September 2001
![]() |
@raja: d_bitmap_proc works. Try DIALOG dlg[] = { /* (proc) (x) (y) (w) (h) (fg) (bg) (key) (flags) (d1) (d2) (dp) (dp2) (dp3) */ { d_bitmap_proc, 0, 0, 344, 176, 0, 0, 0, 0, 0, 0, NULL NULL, NULL }, { d_button_proc, 128, 128, 208, 40, 0, 0, 0, D_EXIT, 0, 0, "Quit", NULL, NULL }, { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; but make sure to set the dp pointer to the correct bitmap: dlg[0]->dp = load_image("foo.tga", NULL);
@type568: -- |
type568
Member #8,381
March 2007
![]() |
You mean he wants to stretch it?
|
spellcaster
Member #1,493
September 2001
![]() |
No, I mean he wants to use it in an allegro dialog -- |
|