So, I have this image (the map) loaded, then puted into a texture.
Image map;
if(!map.loadFromFile("Map.jpg")) return 1;
const unsigned mapW = map.getSize().x, mapH = map.getSize().y;
Texture Map;
Map.loadFromImage(map, IntRect(0,0,mapW,mapH));
Then I added that texture to CircleShapes, one is in the middle and the other is where the mouse is.
CircleShape tankView(tankV);
tankView.setTexture(&Map);
tankView.setPosition(vMode.width/2-tankV, vMode.height/2-tankV);
CircleShape curView(cursorV);
curView.setTexture(&Map);
In the while loop I get XY of the mouse and see if the player moved (w,a,s,d) and acording to that I setPosition of the cursor's CircleShape and setTextureRect (part of the texture) that should be displayed in each of the CircleShapes.
All that works well, but I have a problem, the picture of the map is to small and when I tried to resise the image to a apropriete size I found out that there is a limit for the texture's picture size and it is way smaller that what I need. So I tried to put smaller width/height in setTextureRect, but then cursor's and centered CircleShape didn't overlap correctly and the cursors background looked like it moves when mouse moves. So, how do I zoom in?
My first idea was to have the background, which would be hidden and when a CircleShape is over it it gets displayed, what would be much easyer to work with, but I have no idea how to do that or is it even posible?