Compare commits
No commits in common. "403e2c32d5aa7cd0c44f65fdeb1121fd3eecfa3d" and "5955e0472d77e7fbb9602336e8ec84fa5e30cd6e" have entirely different histories.
403e2c32d5
...
5955e0472d
BIN
MystNB.g1a
35
src/main.c
|
@ -1,10 +1,13 @@
|
|||
#include <gint/display.h>
|
||||
#include <gint/keyboard.h>
|
||||
|
||||
static void draw_menu(int selected)
|
||||
int main(void)
|
||||
{
|
||||
extern bopti_image_t img_title;
|
||||
extern bopti_image_t img_levels;
|
||||
extern font_t font_mystere;
|
||||
|
||||
dfont(&font_mystere);
|
||||
|
||||
dclear(C_WHITE);
|
||||
dimage(0, 2, &img_title);
|
||||
|
@ -23,34 +26,10 @@ static void draw_menu(int selected)
|
|||
{
|
||||
dsubimage(x, y, &img_levels, 11,0,10,10, DIMAGE_NONE);
|
||||
}
|
||||
|
||||
if(i == selected)
|
||||
{
|
||||
drect(x+1, y+1, x+8, y+8, C_INVERT);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int main(void)
|
||||
{
|
||||
extern font_t font_mystere;
|
||||
dfont(&font_mystere);
|
||||
|
||||
int selected = 1;
|
||||
int key = 0;
|
||||
|
||||
while(key != KEY_EXE)
|
||||
{
|
||||
draw_menu(selected);
|
||||
dupdate();
|
||||
|
||||
key = getkey().key;
|
||||
|
||||
if(key == KEY_LEFT && selected > 1)
|
||||
selected--;
|
||||
if(key == KEY_RIGHT && selected < 8)
|
||||
selected++;
|
||||
}
|
||||
|
||||
dupdate();
|
||||
|
||||
getkey();
|
||||
return 1;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 309 B |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 602 B |
Before Width: | Height: | Size: 412 B |
Before Width: | Height: | Size: 506 B |