mirror of
https://github.com/vcmi/vcmi.git
synced 2025-09-16 09:26:28 +02:00
A bit more text-related work:
- credits screen will use multi-line label instead of hackish usage of text box - campaign intro movie player now plays voiced intro - minor fixes to last commit
This commit is contained in:
@@ -482,6 +482,20 @@ std::string CCampaignHandler::prologVideoName(ui8 index)
|
||||
|
||||
std::string CCampaignHandler::prologMusicName(ui8 index)
|
||||
{
|
||||
std::vector<std::string> music;
|
||||
|
||||
VLC->generaltexth->readToVector("Data/CmpMusic.txt", music);
|
||||
if(index < music.size())
|
||||
return music[index];
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string CCampaignHandler::prologVoiceName(ui8 index)
|
||||
{
|
||||
JsonNode config(ResourceID(std::string("CONFIG/campaignMedia"), EResType::TEXT));
|
||||
auto audio = config["voice"].Vector();
|
||||
if(index < audio.size())
|
||||
return audio[index].String();
|
||||
return "";
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user