Page 1 of 1

MakeButton and DoubleBuffer Displays

Posted: Thu Jul 09, 2015 10:51 pm
by TheMartian
Hi

Is it correct, that if I have a DoubleBuffer display I cannot use MakeButton() to create zones for mouseevents? The regular eventhandler responds to mouse events (if set up to do so). But if I include a MakeButton statement, I am told that - 'A BGPIC needs to be active when calling button functions'.

In other words with a DoubleBuffer Display, as it is required by GLGALORE, i should read the mouse coordinates from regular mouse events and 'decode' my zones in the code?

regards
Jesper

Re: MakeButton and DoubleBuffer Displays

Posted: Sat Jul 11, 2015 12:58 pm
by jalih
TheMartian wrote:Is it correct, that if I have a DoubleBuffer display I cannot use MakeButton() to create zones for mouseevents? The regular eventhandler responds to mouse events (if set up to do so). But if I include a MakeButton statement, I am told that - 'A BGPIC needs to be active when calling button functions'.
Try using MakeButton() calls before calling BeginDoubleBuffer() and it should work fine.

Re: MakeButton and DoubleBuffer Displays

Posted: Sat Jul 11, 2015 4:59 pm
by airsoftsoftwair
This is actually a bug. I've fixed it now. Simply do as jalih says and create the button before starting double-buffer mode to workaround the issue.

Re: MakeButton and DoubleBuffer Displays

Posted: Sat Jul 11, 2015 10:05 pm
by TheMartian
Hi

Yes, executing the MakeButton() statement before setting up a DoubleBuffer works for me too. thanks. Since I experiment with multiple displays I just have to be careful that I have activated the right display for my MakeButton() statements.. :)

regards
Jesper