X-Git-Url: https://jasonwoof.com/gitweb/?p=vor.git;a=blobdiff_plain;f=score.c;h=b21345c6ef6152687a59d330d1d18f48e5778033;hp=b9c666e7f36cd1c62fc147eda46cbf5a530c69fd;hb=7f40ee1193e47c59f7297d9361314c731832f7b8;hpb=8332fa82bd3726436a1c3165484ed8207ed23ede diff --git a/score.c b/score.c index b9c666e..b21345c 100644 --- a/score.c +++ b/score.c @@ -161,6 +161,8 @@ display_scores(uint32_t x, uint32_t y) { char t[1024]; int i,h = font_height(); + int display_cursor = (SDL_GetTicks() / CURSOR_BLINK_TIME) % 2; + font_write(x+30, y, "High scores"); y += h; @@ -172,7 +174,7 @@ display_scores(uint32_t x, uint32_t y) font_write(x, y, t); snprintscore(t, 1024, g_scores[g_easy][i].score); font_write(x+50, y, t); - if(i == cur_score) snprintf(t, 1024, "%s_", g_scores[g_easy][i].name); + if(display_cursor && i == cur_score) snprintf(t, 1024, "%s_", g_scores[g_easy][i].name); else snprintf(t, 1024, "%s", g_scores[g_easy][i].name); font_write(x+180, y, t); } @@ -190,7 +192,7 @@ process_score_input(SDL_keysym *key) if(key->sym == SDLK_BACKSPACE) { if(n > 0) name[--n]=0; } else { - if(key->sym == SDLK_RETURN) { + if(key->sym == SDLK_RETURN || key->sym == SDLK_KP_ENTER) { SDL_EnableUNICODE(0); cur_score = -1; if(n == 0) {