]> git.sesse.net Git - ccbs/blobdiff - bigscreen/top10scorescreen.cpp
Center some headings a bit better.
[ccbs] / bigscreen / top10scorescreen.cpp
index f756447243dee4f49f69a9992726a81ea6770d07..275a4f5dc998531f1d97dcb8186264cf0b3f841f 100644 (file)
@@ -26,6 +26,7 @@ bool Top10ScoreScreen::check_invalidated()
                return true;
        if (!scores_changed.get_flag())
                return false;
+       scores_changed.reset_flag();
 
        // check that there are indeed changes, otherwise don't bother
        std::vector<TopScore> scores;
@@ -33,10 +34,11 @@ bool Top10ScoreScreen::check_invalidated()
        
        for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {
                if (seen_topscore.count(*i) == 0) {
+                       valid = false;
                        return true;
                }
        }
-       
+
        return false;
 }
 
@@ -58,7 +60,8 @@ void Top10ScoreScreen::draw(unsigned char *buf, unsigned width, unsigned height)
        // simple headings
        my_draw_text("Player", buf, 12.0, PLAYER_X, 100);
        my_draw_text("Song", buf, 12.0, SONG_X, 100);
-       my_draw_text("Score", buf, 12.0, SCORE_X - 18, 100);
+       width = my_draw_text("Score", NULL, 12.0);
+       my_draw_text("Score", buf, 12.0, SCORE_X - width/2, 100);
        
        unsigned row = 1, y = 140;
        for (std::vector<TopScore>::const_iterator i = scores.begin(); i != scores.end(); ++i) {