fancy file previews don't load custom graphics (for now)
This commit is contained in:
@@ -363,16 +363,20 @@ bool load_party_v2(fs::path file_to_load, cUniverse& real_univ, cCustomGraphics&
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(partyIn.hasFile("save/export.png")) {
|
// Note: if we make custom graphics allowed on PCs, the file picker preview will have to load each party's
|
||||||
std::istream& fin = partyIn.getFile("save/export.png");
|
// export.png and we will need to pass the cCustomGraphics object on the cPict
|
||||||
sf::Image party_sheet;
|
if(!preview){
|
||||||
StdInputStream stream(fin);
|
if(partyIn.hasFile("save/export.png")) {
|
||||||
if(party_sheet.loadFromStream(stream)) {
|
std::istream& fin = partyIn.getFile("save/export.png");
|
||||||
sf::Texture sheet;
|
sf::Image party_sheet;
|
||||||
sheet.create(party_sheet.getSize().x, party_sheet.getSize().y);
|
StdInputStream stream(fin);
|
||||||
sheet.update(party_sheet);
|
if(party_sheet.loadFromStream(stream)) {
|
||||||
spec_scen_g.party_sheet.reset(new sf::Texture(sheet));
|
sf::Texture sheet;
|
||||||
} else if(!preview) showWarning("There was an error loading the party custom graphics.");
|
sheet.create(party_sheet.getSize().x, party_sheet.getSize().y);
|
||||||
|
sheet.update(party_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()) {
|
if(!univ.party.scen_name.empty()) {
|
||||||
|
Reference in New Issue
Block a user