Ejemplo n.º 1
0
void CButton::setSelectedImage(const char* pFile)
{
	if( pFile && strlen(pFile) )
	{
		Texture2D* pTexture = Director::getInstance()->getTextureCache()->addImage(pFile);
		setSelectedTexture(pTexture);
	}
}
Ejemplo 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);
	}
}