Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / Popup window

Author
Message
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 21st Feb 2003 17:49
Hello,
I am new to the DBPro,I have a "stupid" question:

How can I create a popup box without losing the background?
I don't want to use images, just a box.

Let me explain a little bit better: I have a context on the background or the 3d stuff, when a specific event occurs there must open a window, a box,a popup whatever you say, and afterall all the graphical and text commands must draw,write in the that box...

I didn't understand how to use the bitmap,sprite commands maybe... Is there any tutorial? I am about the order the DB Pro hoping that all this stuff is documented.

Thanks...and sorry for my english
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 21st Feb 2003 21:12
Okay, I think your problem is that 3D is overwriting all of your 2D stuff. So here's what I would do:



I hope that's pretty self-explanatory

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 21st Feb 2003 21:33
Thx a lot David89,but the problem is 'also' another:

let's suppose that I have a very complicated drawing (many objects) in the background.. If I use your code,I have to redraw every time when I close the popup... Is there any intelligent way to memorize the underneath screen and then to restore it?

I think this is possible using the bitmaps or sprites but how?
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 21st Feb 2003 22:08
Hiya Barney! Yabadabadoo!

Use GET IMAGE on the background before you draw your box, then paste the image back when you're done.
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 21st Feb 2003 22:20
HI FRED! YABADABADOOOO...



Why the pasted image is distorted,blurred??
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 22nd Feb 2003 01:46
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 22nd Feb 2003 01:51
Oh David don't tell me that this is a bug! ((
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Feb 2003 02:32
Nah. Just put ',1' on the end of the GET IMAGE command to switch off anti-aliasing.

Hey Barn, Wanna go bowling tomorrow? Heh, call me 'Twinkle toes'.

Indi, obviously you are not a member! It's the royal order of water buffalos. ack acka dak, dak daka ack.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 22nd Feb 2003 02:34
I know, I'm sad!
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Feb 2003 13:46
Yes, by using "get image" at the beginning of the my function then using "paste image" at the end, you can grab the contents of the screen before the box adn then paint this image back onto the screen.

I assume that this compilcated picture is 2D? If it was 3d then it would be redrawn the next "sync".

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Feb 2003 13:49
Here is an example of the same code but in 2D:



Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 22nd Feb 2003 15:34
Thank you David,this perfectly resolves the question.
But the popup remains static.
My intention was to make a dragable,moveable window, so I had to use sprites. Like on this example:



With this code I have also the possibility to move the window,without leaving trails and without restoring the background...So,it's a dynamic popup...

Thanks to all for interesting and help..

YABADABADOOOO
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 22nd Feb 2003 18:53
Hi,

This is a bit longer but does what you want (I think )

Place all of your normal main loop inside the sub "MainLoop" and it should be fine



Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.
indi
21
Years of Service
User Offline
Joined: 26th Aug 2002
Location: Earth, Brisbane, Australia
Posted: 23rd Feb 2003 05:00
turchino
21
Years of Service
User Offline
Joined: 11th Feb 2003
Location: Italy
Posted: 23rd Feb 2003 12:22
Yes it does!!!! Thank you very much...
David T
Retired Moderator
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Feb 2003 14:58
Any time

Visit [url]www.lightning-systems.co.uk[/url]
You are the th person to view this signature.

Login to post a reply

Server time is: 2024-04-25 09:56:49
Your offset time is: 2024-04-25 09:56:49