[Add] Gave menu screen a nice finished look.
This commit is contained in:
parent
17db004ba1
commit
5584c3171c
BIN
gfx/saracraft_logo1.png
Normal file
BIN
gfx/saracraft_logo1.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 48 KiB |
@ -462,3 +462,15 @@ static void window_caption(void) {
|
||||
SDL_WM_SetCaption(tmp, NULL);
|
||||
}
|
||||
|
||||
static char human_version[50];
|
||||
|
||||
/**
|
||||
* @brief Return the version in a human readable string.
|
||||
*/
|
||||
char* lephisto_version(void) {
|
||||
if(human_version[0] == '\0')
|
||||
snprintf(human_version, 50, " "APPNAME" v%s - %s", version, dataname);
|
||||
|
||||
return human_version;
|
||||
}
|
||||
|
||||
|
@ -27,3 +27,5 @@ extern char dataname[DATA_NAME_LEN];
|
||||
#define M_PI 3.14159265358979323846 /* Pi. */
|
||||
#endif
|
||||
|
||||
char* lephisto_version(void);
|
||||
|
||||
|
@ -66,6 +66,9 @@ static void menu_generic_close(char* str);
|
||||
|
||||
void menu_main(void) {
|
||||
unsigned int bwid, wid;
|
||||
glTexture* tex;
|
||||
|
||||
tex = gl_newImage("../gfx/saracraft_logo1.png");
|
||||
|
||||
/* Create background image window. */
|
||||
bwid = window_create("BG", -1, -1, SCREEN_W, SCREEN_H);
|
||||
@ -73,6 +76,10 @@ void menu_main(void) {
|
||||
window_addCust(bwid, 0, 0, SCREEN_W, SCREEN_H, "cstBG", 0,
|
||||
(void(*)(double, double, double, double))nebu_render, NULL);
|
||||
|
||||
window_addImage(bwid, (SCREEN_W-tex->sw)/2., -1, "imgLogo", tex, 0);
|
||||
window_addText(bwid, 0., 50., SCREEN_W, 30., 1, "txtBG", NULL,
|
||||
&cWhite, lephisto_version());
|
||||
|
||||
/* Create menu window. */
|
||||
wid = window_create("Main Menu", -1, -1, MAIN_WIDTH, MAIN_HEIGHT);
|
||||
window_addButton(wid, 20, 20 + (BUTTON_HEIGHT+20)*3,
|
||||
|
Loading…
Reference in New Issue
Block a user