diff --git a/source/code/main.cpp b/source/code/main.cpp index a97bef3..8f3c394 100644 --- a/source/code/main.cpp +++ b/source/code/main.cpp @@ -536,19 +536,7 @@ static int InitImages() { NFont_OpenFont(&nf_standard_small_font,"fonts/FreeSerif.ttf",16,nf_standard_small_color); nf_standard_small_font.setDest(screen); NFont_OpenFont(&nf_scoreboard_font,"fonts/PenguinAttack.ttf",20,nf_button_color); - nf_scoreboard_font.setDest(boardBackBack); - nf_scoreboard_font.draw(370,148,_("Score:") ); - nf_scoreboard_font.draw(370,197,_("Time:") ); - nf_scoreboard_font.draw(370,246,_("Chain:") ); - nf_scoreboard_font.draw(370,295,_("Speed:") ); - nf_button_font.setDest(bRetry); - nf_button_font.drawCenter(60,10,_("Retry")); - nf_button_font.setDest(bNext); - nf_button_font.drawCenter(60,10,_("Next")); - nf_button_font.setDest(bSkip); - nf_button_font.drawCenter(60,10,_("Skip")); - nf_button_font.setDest(bBack); - nf_button_font.drawCenter(60,10,_("Back")); + nf_scoreboard_font.setDest(screen); nf_button_font.setDest(screen); @@ -1033,6 +1021,10 @@ public: void DrawImgBoardBounded(SDL_Surface* img, int x, int y) const { DrawIMG_Bounded(img, screen, x+topx, y+topy, topx, topy, topx + backBoard->w, topy + backBoard->h); } + + void PrintTextCenteredBoard(int x, int y, const char* text) { + nf_button_font.drawCenter(x+topx+60, y+topy+10, "%s", text); + } int GetTopX() const { return topx; @@ -1235,6 +1227,11 @@ public: //Draws everything void DoPaintJob() { DrawIMG(boardBackBack,screen,this->GetTopX()-60,this->GetTopY()-68); + + nf_scoreboard_font.draw(this->GetTopX()+310,this->GetTopY()-68+148,_("Score:") ); + nf_scoreboard_font.draw(this->GetTopX()+310,this->GetTopY()-68+197,_("Time:") ); + nf_scoreboard_font.draw(this->GetTopX()+310,this->GetTopY()-68+246,_("Chain:") ); + nf_scoreboard_font.draw(this->GetTopX()+310,this->GetTopY()-68+295,_("Speed:") ); DrawImgBoard(backBoard, 0, 0); nf_standard_blue_font.setDest(screen); //reset to screen at the end of this funciton! @@ -1250,12 +1247,15 @@ public: } if (puzzleMode && stageButtonStatus == SBpuzzleMode) { DrawImgBoard(bRetry, cordRetryButton.x, cordRetryButton.y); + PrintTextCenteredBoard(cordRetryButton.x, cordRetryButton.y, _("Retry")); if (LevelisShuttingDown()) { DrawIMG(backgroundImage,screen,0,0); DrawIMG(bForward,screen,x+460,y+420); + nf_button_font.drawCenter(x+20+60, y+420+10, _("Forward")); DrawIMG(bBack,screen,x+20,y+420); + nf_button_font.drawCenter(x+20+60, y+420+10, _("Back")); const int nrOfFiles = 10; DrawIMG(changeButtonsBack,screen,x,y); for (int i=0; ixplace+50+70)&&(mousey>yplace+200)&&(mousexxplace+50+70+300)&&(mousey>yplace+200)&&(mousexxplace+50+i*40)&&(mousexyplace+150)&&(mouseyxplace+50+i*40+300)&&(mousexyplace+150)&&(mouseyxplace+50+i*40)&&(mousexyplace+330)&&(mouseyxplace+50+i*40+300)&&(mousexyplace+330)&&(mouseyxsize/2-120/2)&&(mousex600)&&(mousey<640)) { - done = true; - } - } - - //DrawIMG(mouse,screen,mousex,mousey); - mouse->PaintTo(screen,mousex,mousey); - SDL_Flip(screen); //draws it all to the screen - SDL_Delay(1); - - } - while (!done && !Config::getInstance()->isShuttingDown()); - DrawIMG(backgroundImage, screen, 0, 0); -} - //This function will promt for the user to select another file for puzzle mode void changePuzzleLevels() { char theFileName[30];