I wrote a quick code which I saved as panel.c and ran it:
#include <acknex.h>
#include <default.c>
var p1_totals=10;
PANEL* pls =
{
layer = 1;
pos_x = 20;
pos_y = 100;
digits(0,0,"The player has %.0f lives",*,1,p1_totals);
flags = VISIBLE;
}
void main()
{
wait(-2);
if (p1_totals == 10)
{
wait(-1);
beep();
p1_totals=5;
}
//toggle(pls, VISIBLE);
}
The display is as follow: The player has 10 lives
After the beep this is displayed OVER the above:
the player has 5 lives
...making the number and the word "lives" unreadable.
Also, if I remove the comment lines to execute 'toggle', NOTHING happens after the beep!. Not even "...5 lives" overlayed.
I did VISTA diagnostics check on DirectX 10 and found NO errors. Games, videos, etc. run ok on the system.
any thoughts?