Ay, Origins :lol: , I guess I need to read the doc with more attention next time...
Here:
#include <SFML/Graphics.hpp>
#include <iostream>
using namespace std;
int main(int argc,char** argv)
{
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "Client");
sf::Font font;
font.LoadFromFile("data/font.ttf",13);
sf::Sprite s;
const sf::Image* img = &font.GetImage();
((sf::Image*)img)->SetSmooth(false);
s.SetImage(*img);
s.SetPosition(100,100);
sf::String str("Hello World!",font,13);
while (App.IsOpened())
{
sf::Event Event;
while (App.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
App.Close();
if (Event.Type == sf::Event::KeyPressed){
if (Event.Key.Code == sf::Key::Escape){
App.Close();
}
}
}
App.Clear(sf::Color(0,0,0));
App.Draw(str);
App.Draw(s);
App.Display();
}
return EXIT_SUCCESS;
}
I also tried the same code but with 2.0 fixes to classes and names, same result.
font.ttf is Windows/Fonts/times.ttf by the way.