Page 1 of 1

How to Clear display Empty when having BGPIC?

Posted: Thu May 02, 2019 1:38 pm
by Bugala
Now this is embarrassing, but I don't seem to be able to figure out this one.

I have a display with a bgpic.

What I would like to do, is to clear the screen empty with one color (black), however, when I use for example Cls() command, it clears the display otherwise but leaves the Background image untouched (which is how it is supposed to work).

So how can I clear a display black when it has Background picture attached to it?, or can I somehow un-attach this Bgpic?

Re: How to Clear display Empty when having BGPIC?

Posted: Thu May 02, 2019 5:18 pm
by airsoftsoftwair
Why don't you just display a new black BGPic?

Re: How to Clear display Empty when having BGPIC?

Posted: Thu May 02, 2019 6:41 pm
by Bugala
hmm.. seems I have misunderstood something here, since I actually tried that and it failed, but trying now again, now it works.

How do those backgrounds actually work?

I had used LoadBGpic(1, file)

then when i first time tried, i just used CreateBGPic(1...) thinking it would replace the previous picture.

But seems I need to add that DisplayBgpic(1) still after that for it to actually replace that old one?

So how does this actually work?

I always thought that selectbgpic would be like, double buffering sort of, that I could have 3 different Bgpics, keep number 1 displayed, and then use selectbgpic 2 or 3 to do things hidden from eyes, and when finally would use displaybgpic 2 or 3 i would see what i did there hidden.

That basically I could have had Game running on BGpic 1, and inventory in bgpic2, and when ever i wanted to peak to inventory, i could have used displaybgpic 2, and then use displaybgpic1 to get back to game.

But now it seems I have misunderstood something, so how exactly do those Bgpics work? Are they basically just brushes that I can choose to attach to a display as a background?

Re: How to Clear display Empty when having BGPIC?

Posted: Thu May 02, 2019 7:03 pm
by emeck
@Bugala
That basically I could have had Game running on BGpic 1, and inventory in bgpic2, and when ever i wanted to peak to inventory, i could have used displaybgpic 2, and then use displaybgpic1 to get back to game.
AFAIU Display library is what you need for that (CreateDisplay, SelectDisplay, OpenDisplay,ShowDisplay, HideDisplay...)