blob: 24dd674dff9a1fe22258faa7487385fe0051ce49 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#include "includes.h"
ChooseHighscoreListState::ChooseHighscoreListState()
{
LOADIMAGE(background,chl)
LOADIMAGE(pointer,pointer)
selection = 0;
SDL_WM_SetCaption("Maze Of Life - Choose Highscore List", NULL);
}
void ChooseHighscoreListState::input(SDLKey key)
{
if ((key == SDLK_UP) && (selection != 0))
{
selection--;
} else if ((key == SDLK_DOWN) && (selection != 2))
{
selection++;
} else if (key == SDLK_RETURN)
{
switch (selection)
{
case 0: // Go to local highscore list
break;
case 1: // Go to global highscore list
break;
case 2:
changeState(new TitleState());
break;
}
}
}
void ChooseHighscoreListState::render(SDL_Surface* screen)
{
SDL_BlitSurface(background, NULL, screen, NULL);
SDL_Rect pSpace;
pSpace.x = 127;
pSpace.y = (selection==0?306:(selection==1?336:396));
pSpace.w = pointer->w;
pSpace.h = pointer->h;
SDL_BlitSurface(pointer, NULL, screen, &pSpace);
}
|