Background::Background(SDLClass &myC) : StaticScreen(myC) { //load image loadFromFile("resources/bg2.png"); setIsScrollingScreen(1); setSpeed(2); TTF_Font *font=TTF_OpenFont("resources/OpenSans-Bold.ttf", 40); SDL_Color textColor={0,0,0}; loadFromText("Game Over", textColor, font, getSDL()->getW()/3, getSDL()->getH()/8); getTexture(1)->setDraw(0); //do not display game over at first loadFromFile("resources/football.png"); //for football in corner indicating if player has a football getTexture(2)->setDraw(0); loadFromText("Level: ", textColor, font, getSDL()->getW()/20, getSDL()->getH()/20); getTexture(3)->setDraw(0); font=TTF_OpenFont("resources/OpenSans-Regular.ttf", 40); loadFromText("Press space to restart", textColor, font, getSDL()->getW()/4, getSDL()->getH()/3); getTexture(4)->setDraw(0); //do not display at first }
BEGIN_JUCE_NAMESPACE #include "juce_LocalisedStrings.h" //============================================================================== LocalisedStrings::LocalisedStrings (const String& fileContents) { loadFromText (fileContents); }
LocalisedStrings::LocalisedStrings (const File& fileToLoad, bool ignoreCase) { loadFromText (fileToLoad.loadFileAsString(), ignoreCase); }
LocalisedStrings::LocalisedStrings (const String& fileContents, bool ignoreCase) { loadFromText (fileContents, ignoreCase); }
LocalisedStrings::LocalisedStrings (const File& fileToLoad) { loadFromText (fileToLoad.loadFileAsString()); }
LocalisedStrings::LocalisedStrings (const String& fileContents) { loadFromText (fileContents); }