summary refs log tree commit diff stats
path: root/chlstate.cpp
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2009-10-18 15:24:07 -0400
committerKelly Rauchenberger <fefferburbia@gmail.com>2009-10-18 15:24:07 -0400
commitc027f1b9cd6c9deb60931a7f9f75bb4ee130291b (patch)
tree49426a9cf3ee24434141c903b01481110b2808b6 /chlstate.cpp
parenta157cd82a86390f1fcb1a2086f86af5187e85a69 (diff)
downloadmazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.tar.gz
mazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.tar.bz2
mazeoflife-c027f1b9cd6c9deb60931a7f9f75bb4ee130291b.zip
Added local highscore list
You can now view and add to a local highscore list.

A change to State was necessary due to how the user's name would be entered into the highscore list and thus all states have been modified.

Refs #104
Diffstat (limited to 'chlstate.cpp')
-rw-r--r--chlstate.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/chlstate.cpp b/chlstate.cpp index 24dd674..3f3000d 100644 --- a/chlstate.cpp +++ b/chlstate.cpp
@@ -10,19 +10,21 @@ ChooseHighscoreListState::ChooseHighscoreListState()
10 SDL_WM_SetCaption("Maze Of Life - Choose Highscore List", NULL); 10 SDL_WM_SetCaption("Maze Of Life - Choose Highscore List", NULL);
11} 11}
12 12
13void ChooseHighscoreListState::input(SDLKey key) 13void ChooseHighscoreListState::input(SDL_keysym key)
14{ 14{
15 if ((key == SDLK_UP) && (selection != 0)) 15 if ((key.sym == SDLK_UP) && (selection != 0))
16 { 16 {
17 selection--; 17 selection--;
18 } else if ((key == SDLK_DOWN) && (selection != 2)) 18 } else if ((key.sym == SDLK_DOWN) && (selection != 2))
19 { 19 {
20 selection++; 20 selection++;
21 } else if (key == SDLK_RETURN) 21 } else if (key.sym == SDLK_RETURN)
22 { 22 {
23 switch (selection) 23 switch (selection)
24 { 24 {
25 case 0: // Go to local highscore list 25 case 0:
26 changeState(new LocalHighscoreListState(false));
27
26 break; 28 break;
27 case 1: // Go to global highscore list 29 case 1: // Go to global highscore list
28 break; 30 break;