Esempio n. 1
0
void CButton::setSelectedImage(const char* pFile)
{
	if( pFile && strlen(pFile) )
	{
		Texture2D* pTexture = Director::getInstance()->getTextureCache()->addImage(pFile);
		setSelectedTexture(pTexture);
	}
}
Esempio n. 2
0
// Set our start values and load our menu textures if it's our first time at the screen.
MainMenu::MainMenu()
{
	setCurrentSelection(0);
	setSplashState(true);
	setChangedSelection(false);
	setExiting(false);

	hScoreString = "High score: ";

	setSelectedTexture("Select");
	setSplashTexture("Splash");
	setFontMap("Font");

	if (!loaded)
	{
		loadTexture(selectedTexture, "../textures/select.png", 1, 1);
		loadTexture(splashTexture, "../textures/splash.bmp", 1, 1);
		loadTexture(fontMap, "../textures/fontmap.png", 16, 16);
	}
}