Page 1 of 1

DeleteButton with DoubleBuffer gives error, bug or a feature?

Posted: Mon Feb 12, 2024 10:53 am
by Bugala

Code: Select all

BeginDoubleBuffer()
MakeButton(1, #SIMPLEBUTTON, 100, 100, 200, 200, {OnMouseUp=Function() EndFunction})
DeleteButton(1)
will complain "A BGPic needs to be active while calling button functions!"

Problem can be got around by turning doublebuffering off before DeleteButton and then back on after having done DeleteButton.

Is this a bug or a feature? for it seems odd that I can create and use buttons when DoubleBuffering is on, but I cant delete them until I first turn DoubleBuffering off.

Re: DeleteButton with DoubleBuffer gives error, bug or a feature?

Posted: Mon Feb 19, 2024 9:30 pm
by airsoftsoftwair
That's actually a feature. Double buffer puts Hollywood in a rather lowlevel state and it's expected that you handle everything manually. Layers and sprites aren't available in double buffering mode either.