I try to toggle the overlay | visible flags of a panel with pressing the F11 key. if key_f11 causes the panel to toggle all the time when pressing the key. Next way leaded to the manual where i couldn't find my needed info.
on_f11 = toggle(panDisplay2,VISIBLE); just crashes ...
And so i ended in this construct:
Code:
var keyblock;
void main ()
{
...
while (1)
{
if ((key_f11) && (keyblock == 0))
{
toggle(panDisplay2,VISIBLE);
toggle(panDisplay2,OVERLAY);
toggle(panDisplay,VISIBLE);
toggle(panDisplay,OVERLAY);
keyblock = 1;
}
if ((key_f11 == 0) && (keyblock == 1))
{
keyblock = 0;
}
}
...
}
Well, it works. But for me it seems an enourmous effort to implement a keyblocker var for every possible key. Is there a better way to do what i want?