本文整理汇总了C++中ISkin::getSkinsList方法的典型用法代码示例。如果您正苦于以下问题:C++ ISkin::getSkinsList方法的具体用法?C++ ISkin::getSkinsList怎么用?C++ ISkin::getSkinsList使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISkin
的用法示例。
在下文中一共展示了ISkin::getSkinsList方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: run
EMenuScreen GraphicsConfigMenu::run(MainWindow& window, EMenuScreen previous)
{
this->window = &window;
// Configuration plein ecran
fullscreen.setCurrentItem(window.getFullScreen());
if (window.canFullScreen())
{
skinList.setPrevious(&fullscreen);
this->widgets.push_back(&fullscreen);
}
else
this->widgets.push_back(&noFullscreen);
// Mise à jour du skin
ISkin* skin = PolyBomberApp::getISkin();
std::vector<std::string> skins = skin->getSkinsList();
for (unsigned int i=0; i<skins.size(); i++)
{
if (skin->getSkin().compare(skins[i]) == 0)
skinList.setCurrentItem(i);
}
return IMenuScreen::run(window, previous);
}
示例2: rightPressed
void GraphicsConfigMenu::rightPressed()
{
ISkin* skin = PolyBomberApp::getISkin();
std::vector<std::string> skins = skin->getSkinsList();
cancel.goNext();
fullscreen.goNextItem();
skinList.goNextItem();
skin->setSkin(skins[skinList.getCurrentItem()]);
}
示例3:
GraphicsConfigMenu::GraphicsConfigMenu() :
title("Configuration graphique", TITLEFONT, 100),
textFullscreen("Mode plein-ecran : ", TEXTFONT, 200),
fullscreen(TEXTFONT, 200),
noFullscreen("Indisponible", ERRORFONT, 200),
skinText("Skin choisi :", TEXTFONT, 300),
skinList(TEXTFONT, 350),
cancel("Annuler", 450, CONFIGMENU),
save("Valider", 450, CONFIGMENU)
{
ISkin* skin = PolyBomberApp::getISkin();
title.setColor(skin->getColor(TITLECOLOR));
skinText.setColor(skin->getColor(TEXTCOLOR));
textFullscreen.setColor(skin->getColor(TEXTCOLOR));
// Mode plein ecran
textFullscreen.move(-100, 0);
fullscreen.push_back("non");
fullscreen.push_back("oui");
fullscreen.move(100, 0);
noFullscreen.setColor(skin->getColor(ERRORCOLOR));
noFullscreen.move(100, 0);
// Liste des skins
std::vector<std::string> skins = skin->getSkinsList();
for (unsigned int i=0; i<skins.size(); i++)
skinList.push_back(skins[i]);
cancel.move(-100, 0);
save.move(100, 0);
cancel.setSelected(true);
fullscreen.setNext(&skinList);
skinList.setNext(&cancel);
cancel.setPrevious(&skinList);
cancel.setNext(&save);
save.setPrevious(&skinList);
save.setNext(&cancel);
this->widgets.push_back(&title);
this->widgets.push_back(&textFullscreen);
this->widgets.push_back(&skinText);
this->widgets.push_back(&skinList);
this->widgets.push_back(&cancel);
this->widgets.push_back(&save);
this->window = NULL;
}