本文整理汇总了C++中PlayerData::getParty方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerData::getParty方法的具体用法?C++ PlayerData::getParty怎么用?C++ PlayerData::getParty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerData
的用法示例。
在下文中一共展示了PlayerData::getParty方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: activeState
MenuShell::MenuShell(PlayerData& playerData) : activeState(NULL)
{
try
{
setWidth(GraphicsUtil::getInstance()->getWidth());
setHeight(GraphicsUtil::getInstance()->getHeight());
const gcn::Color menuBackgroundColor(50, 50, 50, 150);
const gcn::Rectangle menuAreaRect(0, 0, getWidth() * 0.8 - 5, getHeight() - 10);
bg = new gcn::Icon("data/images/menubg.jpg");
selectSound = ResourceLoader::getSound("reselect");
menuTabs = new edwt::TabbedArea();
menuArea = new edwt::Container();
menuArea->setDimension(menuAreaRect);
menuArea->setOpaque(false);
menuTabs->setDimension(menuAreaRect);
menuTabs->setForegroundColor(0xFFFFFF);
menuTabs->setBaseColor(menuBackgroundColor);
menuTabs->setDimension(menuAreaRect);
menuTabs->addTab("Party", menuArea);
CharacterList party = playerData.getParty();
for (CharacterList::iterator iter = party.begin(); iter != party.end(); ++iter)
{
menuTabs->addTab((*iter)->getName(), menuArea);
}
populateOpsList();
actionsListBox = new edwt::ListBox(listOps);
actionsListBox->setBaseColor(0xFFFFFF);
actionsListBox->setMinWidth((getWidth() * 0.2) - 10);
actionsListBox->setAlignment(edwt::RIGHT);
actionsListBox->adjustSize();
actionsListBox->adjustWidth();
actionsListBox->setBackgroundColor(menuBackgroundColor);
actionsListBox->setOpaque(false);
actionsListBox->setRowPadding(5);
actionsListBox->addActionListener(this);
actionsListBox->addSelectionListener(this);
add(bg);
add(menuTabs, getWidth() * 0.2, 5);
add(actionsListBox, 5, menuTabs->getTabHeight() + 5);
}
catch (gcn::Exception& e)
{
DEBUG(e.getMessage());
}
}
示例2: playerData
SaveGameModule::SaveGameModule(PlayerData& playerData) : playerData(playerData)
{
setNumberOfColumns(PlayerData::PARTY_SIZE);
setHorizontalSpacing(10);
setPadding(5, 5, 5, 5);
CharacterList party = playerData.getParty();
for(CharacterList::iterator iter = party.begin(); iter != party.end(); ++iter)
{
edwt::Icon* characterPicture = new edwt::Icon((*iter)->getPortraitPath());
add(characterPicture);
characterPortraits.push_back(characterPicture);
}
adjustContent();
setOpaque(false);
addMouseListener(this);
}