This question is not only related to PureBasic but to coding in general. I'm wondering how to interact with a complex 2D drawing, like a country. For example, I would like to be able to highlight the border of this country when the user selects it. I would also like to be able to apply filters on a world map, to show population on a coloured-scale, from red to green.
Currently, I've got a little program that manage to detect what country the user has selected (by simple left-clicking). To do that, I've made two maps ; one to display and another one, on which I've coloured every countries with a different color (using Photoshop). When the user clicks on the map, I look at the coordinates on the "technical map", and retrieve the country via its $colour. I don't use a screen.
But with this technique, I'm unable to achieve the two points mentionned above. Analyzing each pixel and redraw on top of the displayed map takes too much time (it's a very big map).
So what should I do ? There must be a theoritical method to do this ? For example, would it be better to use sprites ? I don't clearly see the need of using them when I should.
I don't know if I'm clear enough here, but thanks anyway for reading
