1
Window / How to position the text on (0, 0)?
« on: June 19, 2011, 04:41:46 pm »
I use sfml 2 and I try to center the text in my button. However it seems text has a vertical margin so even if position is (0, 0) it starts at (0,10) or something like that and it doesn't look right.
Here is the example. Any help?
Here is the example. Any help?
Code: [Select]
#include <iostream>
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode( 800, 600 ), "Test" );
sf::Text text( "Test!" );
window.Clear();
window.Draw(text );
window.Display();
system("pause");
return 0;
}