Mmh, je ne vois pas ce que je peux ajouter, à part que j'utilise la version 2.1 de SFML sous windows.
Sinon, je n'ai pas de message d'erreur et si vous tenez à avoir un bout de code, voilà comment j'utilise les vertexarray :
void Key::print()
{
sf::Color darkGrey(60, 60, 60);
sf::Color grey(120, 120, 120);
sf::Color silver(200, 200, 200);
int shadowMove = 3;
sf::VertexArray shadow(sf::Quads, 4);
shadow[0].position = sf::Vector2f(x+shadowMove, y+shadowMove);
shadow[1].position = sf::Vector2f(x+width+shadowMove, y+shadowMove);
shadow[2].position = sf::Vector2f(x+width+shadowMove, y+height+shadowMove);
shadow[3].position = sf::Vector2f(x+shadowMove, y+height+shadowMove);
shadow[0].color = sf::Color::Black;
shadow[1].color = darkGrey;
shadow[2].color = darkGrey;
shadow[3].color = darkGrey;
keyboard->getWindow()->draw(shadow);
sf::VertexArray border(sf::Quads, 4);
border[0].position = sf::Vector2f(x, y);
border[1].position = sf::Vector2f(x+width, y);
border[2].position = sf::Vector2f(x+width, y+height);
border[3].position = sf::Vector2f(x, y+height);
border[0].color = grey;
border[1].color = grey;
border[2].color = grey;
border[3].color = grey;
keyboard->getWindow()->draw(border);
sf::VertexArray rectangle(sf::Quads, 4);
rectangle[0].position = sf::Vector2f(x+borderSize, y+borderSize);
rectangle[1].position = sf::Vector2f(x+width-borderSize, y+borderSize);
rectangle[2].position = sf::Vector2f(x+width-borderSize, y+height-borderSize);
rectangle[3].position = sf::Vector2f(x+borderSize, y+height-borderSize);
rectangle[0].color = silver;
rectangle[1].color = silver;
rectangle[2].color = silver;
rectangle[3].color = silver;
keyboard->getWindow()->draw(rectangle);
}
Et comment je faisais avant (avec le Text en plus) :
sf::RectangleShape rectangle;
rectangle.setSize(sf::Vector2f(width-borderSize, height-borderSize));
rectangle.setOutlineColor(grey);
rectangle.setFillColor(silver);
rectangle.setOutlineThickness(borderSize);
rectangle.setPosition(x, y);
keyboard->getWindow()->draw(rectangle);
sf::Text text;
sf::Font font;
font.loadFromFile("arial.TTF");
text.setFont(font);
text.setString(value);
text.setCharacterSize(fontSize);
//text.setStyle(sf::Text::Bold);
text.setColor(sf::Color::White);
text.setPosition(x, y);
text.move(15, 5);
keyboard->getWindow()->draw(text);
Je ne vois pas ce que je peux ajouter de plus :/
Je suis désolée si mon poste ne convient pas, mais dans ce cas, dites-moi précisément ce que vous attendez