本文整理汇总了C++中ISkin::loadImage方法的典型用法代码示例。如果您正苦于以下问题:C++ ISkin::loadImage方法的具体用法?C++ ISkin::loadImage怎么用?C++ ISkin::loadImage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ISkin
的用法示例。
在下文中一共展示了ISkin::loadImage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ImageWidget
ScoreMenu::ScoreMenu(SMenuConfig* menuConfig) :
title("Score de la partie", TITLEFONT, 100),
winner("Le joueur i a gagne !", TEXTFONT, 170),
back("Retour au menu", 550, MAINMENU),
menuConfig(menuConfig)
{
ISkin* skin = PolyBomberApp::getISkin();
title.setColor(skin->getColor(TITLECOLOR));
winner.setColor(skin->getColor(TEXTCOLOR));
back.setSelected(true);
this->widgets.push_back(&title);
this->widgets.push_back(&winner);
this->widgets.push_back(&back);
for (int i=0; i<4; i++)
{
this->pictures[i] = new ImageWidget();
this->pictures[i]->setPosition(300, 250 + 60*i);
this->pictures[i]->setImage(skin->loadImage((EImage)(PLAYER1 + i)));
this->names[i] = new TextWidget("", TEXTFONT, 250 + 60*i);
this->names[i]->setColor(skin->getColor(TEXTCOLOR));
this->widgets.push_back(this->pictures[i]);
this->widgets.push_back(this->names[i]);
}
}
示例2: initBonus
void GameOptionsMenu::initBonus()
{
ISkin* skin = PolyBomberApp::getISkin();
EImage icones[18] = {EIMAGE_BOMBPLUS, EIMAGE_BOMBMOINS, EIMAGE_RANGEPLUS, EIMAGE_RANGEMOINS,
EIMAGE_RANGEMAX, EIMAGE_MINEBONUS, EIMAGE_INFINITY, EIMAGE_ATOMIC,
EIMAGE_VITESSEPLUS, EIMAGE_VITESSEMOINS, EIMAGE_BOMBLINE, EIMAGE_REMOTEBONUS,
EIMAGE_CRANE, EIMAGE_HELL, EIMAGE_CONFUSION, EIMAGE_SPASME, EIMAGE_DILATATION,
EIMAGE_RAGE};
int i;
for (i=0; i<18; i++)
{
int j = i;
if (i >= 12) j -= 12;
else if (i >= 8) j -= 8;
this->images[i] = new ImageWidget();
this->images[i]->setImage(skin->loadImage(icones[i]));
this->images[i]->setPosition(300,200+40*j);
this->bonus[i] = new SelectionWidget(TEXTFONT, 200 + 40*j);
this->bonus[i]->push_back("0");
this->bonus[i]->push_back("1");
this->bonus[i]->push_back("2");
this->bonus[i]->push_back("3");
this->bonus[i]->push_back("4");
this->bonus[i]->push_back("5");
this->bonus[i]->push_back("6");
this->bonus[i]->push_back("7");
this->bonus[i]->push_back("8");
this->bonus[i]->push_back("9");
this->bonus[i]->push_back("10");
this->bonus[i]->setCurrentItem(this->menuConfig->gameConfig.nbBonus[i]);
this->bonus[i]->move(70, 0);
if (j > 0)
this->bonus[i]->setPrevious(this->bonus[i-1]);
else
this->bonus[i]->setPrevious(&category);
this->widgets.push_back(this->images[i]);
this->widgets.push_back(this->bonus[i]);
}
for (i=0; i<7; i++)
this->bonus[i]->setNext(this->bonus[i+1]);
for (i=8; i<11; i++)
this->bonus[i]->setNext(this->bonus[i+1]);
for (i=12; i<17; i++)
this->bonus[i]->setNext(this->bonus[i+1]);
this->bonus[7]->setNext(&cancel);
this->bonus[11]->setNext(&cancel);
this->bonus[17]->setNext(&cancel);
setCategory();
}
示例3: ImageWidget
WaitingMenu::WaitingMenu(SMenuConfig* menuConfig) :
title("Resume de la partie", TITLEFONT, 50),
ip("Adresse IP du serveur : ", TEXTFONT, 150),
cancel("Annuler", 500, GAMEMENU),
start("Jouer !", 500, RUNGAME),
menuConfig(menuConfig)
{
ISkin* skin = PolyBomberApp::getISkin();
title.setColor(skin->getColor(TITLECOLOR));
ip.setColor(skin->getColor(TEXTCOLOR));
this->network = PolyBomberApp::getINetworkToMenu();
ip.setString(ip.getString() + this->network->getIpAddress());
ip.move(-80, 0);
cancel.move(-100, 0);
start.move(100, 0);
cancel.setSelected(true);
cancel.setNext(&start);
start.setNext(&cancel);
this->widgets.push_back(&title);
this->widgets.push_back(&ip);
this->widgets.push_back(&cancel);
this->widgets.push_back(&start);
for (int i=0; i<4; i++)
{
this->pictures[i] = new ImageWidget();
this->pictures[i]->setPosition(300, 200 + 60*i);
this->pictures[i]->setImage(skin->loadImage((EImage)(PLAYER1 + i)));
this->names[i] = new TextWidget("...", TEXTFONT, 210 + 60*i);
this->names[i]->setColor(skin->getColor(TEXTCOLOR));
this->names[i]->move(100, 0);
this->widgets.push_back(this->pictures[i]);
this->widgets.push_back(this->names[i]);
}
}
示例4:
IMenuScreen::IMenuScreen()
{
ISkin* skin = PolyBomberApp::getISkin();
background.setImage(skin->loadImage(MENU_BACKGROUND));
this->widgets.push_back(&background);
}