我只是想了解更多关于跨平台编程的知识。我在SFML 2.1和C ++中创建游戏。我有一个问题。此代码在Linux下运行,但它在Windows(MinGW)下不起作用。没有错误,但没有任何错误。
Shop::Shop(): shop_texts() {}
//...
void Shop::draw(App* app)
{
app->window.draw(shop_texts.getText("btn_playerskins"));
}
shop_texts
会返回sf::Drawable
个对象。
然后在App:
shop.draw(this);
shop_texts
存在,因为我可以检查例如位置或文本(此对象包含sf :: Text字段)。有什么区别?