Let's get straight to the problem, I'm writing my simple project thingie, I came up with an idea to split the screen in more separate containers, it kinda works, except of vertical, wanna help me out here?
http://i.imgur.com/1pC9XeI.png is the graphical way to show you what it looks like
Counting out areas for 1
Area data - l = 533 t = 1 h = 599 w = 799
Vertical split = 399
Pushing L = 533 T = 1 W = 799 H = 400
Pushing L = 533 T = 400 W = 799 H = 799
0 L = 533 T = 1 W = 799 H = 400
1 L = 533 T = 400 W = 799 H = 799
Area L = 533 T = 1 W = 799 H = 400
Setting size at 266x399
Area L = 533 T = 400 W = 799 H = 799
Setting size at 266x399
Size = 1.70513x2.8913
Size = 1.70513x2.8913
The data it's using, the image is 156x138
The X scale = 1.70513, as you can read it, Y scale is = 2.8913
So... what's wrong?
Well, technically, nothing
Except that window that's on the image has 800 pixels
If the height of each image is 400, how is the second one coming out of the window?
sprite->setPosition( this->Area.left, this->Area.top );
const sf::Texture *vectemp = sprite->getTexture();
sf::Vector2u vec = vectemp->getSize();
sprite->setScale(( ( this->Area.width - this->Area.left) / vec.x ), ( ( this->Area.height - this->Area.top ) / vec.y ));
std::cout << "Setting size at " << this->Area.width - this->Area.left << "x"
<< this->Area.height - this->Area.top << std::endl;
Ideas?