I'm using Bloodshed Dev-C++ for C++ using A7 engine (version 7.06.1).
Showing panels itself is no problem, but I don't know how to implement buttons into them. When I try to implement button into my panel, both
bmap and
button give me an error that they are undeclared.
I tried all variations of buttons and different ways of putting them:
button_toggle(_VAR(0), _VAR(0), resume0_bmp, resume0_bmp, resume1_bmp, resume1_bmp, NULL, NULL, NULL);
and
button_toggle = _VAR(0), _VAR(0), resume0_bmp, resume0_bmp, resume1_bmp, resume1_bmp, NULL, NULL, NULL;
This is part of my codes (there are no functions inside my button, it is still in testing phase):
BMAP* resume0_bmp = bmap_create("button_resumeOut.bmp");
BMAP* resume1_bmp = bmap_create("button_resumeOver.bmp");
PANEL* pause_pan;
void loadHUD()
{
pause_pan = pan_create("bmap = screen_pause.tga;", _VAR(2));
pause_pan->pos_x = _VAR(373);
pause_pan->pos_y = _VAR(197);
pause_pan->flags |= OVERLAY | TRANSLUCENT;
button_toggle(_VAR(0), _VAR(0), resume0_bmp, resume0_bmp, resume1_bmp, resume1_bmp, NULL, NULL, NULL);
}
void engine_init()
{
ev = engine_open(NULL);
SETV(video_mode, 8);
SETV(max_particles, 20000);
SETV(max_entities, 2000);
SETV(fps_max, 60);
SETV(ph_fps_max_lock, 60);
SETV(shadow_stencil, ON);
...
loadHUD();
...
}
Creating it using this method doesn't give any error on compiling but crash while running.
PANEL* pause_pan = pan_create("bmap = screen_pause.tga; pos_x = _VAR(373); pos_y = _VAR(197); button_toggle(_VAR(0), _VAR(0), resume0_bmp, resume0_bmp, resume1_bmp, resume1_bmp, NULL, NULL, NULL); flags |= OVERLAY | TRANSLUCENT | INVISIBLE;", _VAR(3));
Anyone know what is my problem? How can I solve it?
EDIT: typo