PDA

View Full Version : Scroll large image in game



Morea
11th August 2006, 12:30
Here is the problem: I want to have a black background and a lot of planets drawn on the map. I want to be able to click on a planet, and then this planet should send a signal to a slot that will show information about this specific planet.

The question is then how to do this.
Should I draw a large image and then just scroll it, and when I click on the image, should I search for the planet to see if any one was selected?

Any ideas on this?

jacek
11th August 2006, 12:45
It depends how much is "a lot of planets". Large image will consume large amount of memory. If you redraw your scroll area wisely, you might not need the pixmap.

gfunk
12th August 2006, 00:06
Maybe you can just create pushbuttons (masked by a round QBitmap) to represent your planets, and have them located all around your background. And just connect the buttons to open a message box, or just use the tooltips text even, to show information about a planet. :p