fancy file previews don't load custom graphics (for now)

This commit is contained in:
2025-05-17 19:52:32 -05:00
parent f2492d6fb4
commit e089effea4

View File

@@ -363,6 +363,9 @@ bool load_party_v2(fs::path file_to_load, cUniverse& real_univ, cCustomGraphics&
}
}
// Note: if we make custom graphics allowed on PCs, the file picker preview will have to load each party's
// export.png and we will need to pass the cCustomGraphics object on the cPict
if(!preview){
if(partyIn.hasFile("save/export.png")) {
std::istream& fin = partyIn.getFile("save/export.png");
sf::Image party_sheet;
@@ -371,9 +374,10 @@ bool load_party_v2(fs::path file_to_load, cUniverse& real_univ, cCustomGraphics&
sf::Texture sheet;
sheet.create(party_sheet.getSize().x, party_sheet.getSize().y);
sheet.update(party_sheet);
spec_scen_g.party_sheet.reset(new sf::Texture(sheet));
graphics.party_sheet.reset(new sf::Texture(sheet));
} else if(!preview) showWarning("There was an error loading the party custom graphics.");
}
}
if(!univ.party.scen_name.empty()) {
fs::path path = locate_scenario(univ.party.scen_name);