我在写俄罗斯方块的时候写到了和显示文字有关的函数,我用了指针传RenWindow* window参数,然后莫名其妙的
了
SFML/C++
环境:windows 10, visual studio 2022
void SettingButton::draw(RenderWindow* window, float posX, float posY) {
Text text;
FloatRect box = subButton.buttonSprite.getGlobalBounds();
//subButton是一个Sprite
text.setFont(font);
text.setString(L"wtf");
text.setPosition(posX + box.width * 2, posY);
window->draw(text);
}