当前位置: 首页>>代码示例>>C++>>正文


C++ ISkin::getSkinsList方法代码示例

本文整理汇总了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);
	}
开发者ID:Damsolla,项目名称:projetBomberman,代码行数:27,代码来源:GraphicsConfigMenu.cpp

示例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()]);
	}
开发者ID:Damsolla,项目名称:projetBomberman,代码行数:10,代码来源:GraphicsConfigMenu.cpp

示例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;
	}
开发者ID:Damsolla,项目名称:projetBomberman,代码行数:54,代码来源:GraphicsConfigMenu.cpp


注:本文中的ISkin::getSkinsList方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。