本文整理汇总了C++中Campaign::getName方法的典型用法代码示例。如果您正苦于以下问题:C++ Campaign::getName方法的具体用法?C++ Campaign::getName怎么用?C++ Campaign::getName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::getName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rMain
void
MissionSelector::show(bool enableClose)
{
mCloseButton->setEnabled(enableClose);
Mission* currentMission = rMain()->getMission();
if(ConfigManager::getPlayer()->getHomeBase() == currentMission) {
mHomeBaseButton->setVisible(false);
}
else {
mHomeBaseButton->setVisible(true);
}
sort(mCampaigns.begin(), mCampaigns.end(), lessCampaign);
mCampaignList->removeAllItems();
for(vector<Campaign*>::const_iterator iCampaign = mCampaigns.begin(); iCampaign != mCampaigns.end(); ++iCampaign) {
Campaign* campaign = *iCampaign;
mCampaignList->addItem(campaign->getName());
}
sort(mMissions.begin(), mMissions.end(), lessEntry);
updateMissionList();
Dialog::show();
}
示例2: loadCampaign
void Campaigns::loadCampaign(const Campaign &campaign) {
unload(false);
try {
_currentCampaign = getCampaign(campaign.getUID());
if (!_currentCampaign)
throw Common::Exception("Campaign does not exist in this context");
_currentCampaign->load();
} catch (Common::Exception &e) {
unload(false);
e.add("Failed loading campaign \"%s\" (\"%s\")",
campaign.getUID().c_str(), campaign.getName().getString().c_str());
throw e;
}
_hasCampaign = true;
}