mirror of
https://github.com/UberGames/rpgxEF.git
synced 2024-11-10 07:11:34 +00:00
Continued work on slq login menu
* note: new graphics not uploaded yet
This commit is contained in:
parent
9101ad9a3b
commit
62f54b070e
1 changed files with 40 additions and 12 deletions
|
@ -10,9 +10,11 @@ typedef struct {
|
|||
menuframework_s menu;
|
||||
menubitmap_s quitmenu;
|
||||
menubitmap_s login;
|
||||
menufield_s user;
|
||||
menufield_s password;
|
||||
|
||||
char *username;
|
||||
char *password;
|
||||
char *sUsername;
|
||||
char *sPassword;
|
||||
} sql_t;
|
||||
|
||||
sql_t s_sql;
|
||||
|
@ -57,9 +59,8 @@ sfxHandle_t sqlMenu_Key (int key)
|
|||
return ( Menu_DefaultKey( &s_sql.menu, key ) );
|
||||
}
|
||||
|
||||
extern qhandle_t leftRound;
|
||||
extern qhandle_t corner_ul_24_60;
|
||||
extern qhandle_t corner_ll_12_60;
|
||||
qhandle_t box_rounded;
|
||||
qhandle_t corner_lu;
|
||||
|
||||
|
||||
/*
|
||||
|
@ -69,6 +70,22 @@ M_sqlMenu_Graphics
|
|||
*/
|
||||
static void M_sqlMenu_Graphics (void)
|
||||
{
|
||||
float bg[] = { 0, 0, 0, 0.7 };
|
||||
|
||||
trap_R_SetColor(bg);
|
||||
UI_DrawHandlePic(160, 120, 320, 240, box_rounded);
|
||||
|
||||
trap_R_SetColor(colorTable[CT_LTBLUE1]);
|
||||
UI_DrawHandlePic(164, 124, 64, 64, corner_lu);
|
||||
UI_DrawHandlePic(412, 124, -64, 64, corner_lu);
|
||||
UI_DrawHandlePic(164, 292, 64, -64, corner_lu);
|
||||
UI_DrawHandlePic(412, 292, -64, -64, corner_lu);
|
||||
UI_DrawHandlePic(232, 124, 176, 31.75, uis.whiteShader);
|
||||
UI_DrawHandlePic(232, 324, 176, 31.75, uis.whiteShader);
|
||||
UI_DrawHandlePic(164, 192, 31.75, 96, uis.whiteShader);
|
||||
UI_DrawHandlePic(444, 192, 31.75, 96, uis.whiteShader);
|
||||
UI_DrawString(234, 132, "LCARS AUTH", UI_LEFT|UI_SMALLFONT, colorTable[CT_BLACK], qtrue); // TODO multi lang text
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
@ -79,9 +96,8 @@ UI_sqlMenu_Cache
|
|||
*/
|
||||
void UI_sqlMenu_Cache (void)
|
||||
{
|
||||
leftRound = trap_R_RegisterShaderNoMip("menu/common/halfroundl_24.tga");
|
||||
corner_ul_24_60 = trap_R_RegisterShaderNoMip("menu/common/corner_ul_24_60.tga");
|
||||
corner_ll_12_60 = trap_R_RegisterShaderNoMip("menu/common/corner_ll_12_60.tga");
|
||||
box_rounded = trap_R_RegisterShaderNoMip("menu/common/box_rounded.tga");
|
||||
corner_lu = trap_R_RegisterShaderNoMip("menu/common/corner_lu.tga");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -108,8 +124,8 @@ void sqlMenu_Init(void)
|
|||
s_sql.menu.draw = sqlMenu_Draw;
|
||||
s_sql.menu.key = sqlMenu_Key;
|
||||
s_sql.menu.wrapAround = qtrue;
|
||||
s_sql.menu.descX = MENU_DESC_X;
|
||||
s_sql.menu.descY = MENU_DESC_Y;
|
||||
s_sql.menu.descX = -400;
|
||||
s_sql.menu.descY = -400;
|
||||
s_sql.menu.titleX = MENU_TITLE_X;
|
||||
s_sql.menu.titleY = MENU_TITLE_Y;
|
||||
s_sql.menu.fullscreen = qfalse;
|
||||
|
@ -128,7 +144,7 @@ void sqlMenu_Init(void)
|
|||
s_sql.quitmenu.color2 = CT_LTPURPLE1;
|
||||
s_sql.quitmenu.textX = MENU_BUTTON_TEXT_X;
|
||||
s_sql.quitmenu.textY = 12;
|
||||
s_sql.quitmenu.textEnum = MBT_QUIT;
|
||||
s_sql.quitmenu.textEnum = MBT_QUIT; // TODO needs own text
|
||||
s_sql.quitmenu.textcolor = CT_BLACK;
|
||||
s_sql.quitmenu.textcolor2 = CT_WHITE;
|
||||
s_sql.quitmenu.textStyle = UI_TINYFONT;
|
||||
|
@ -146,13 +162,25 @@ void sqlMenu_Init(void)
|
|||
s_sql.login.color2 = CT_LTPURPLE1;
|
||||
s_sql.login.textX = MENU_BUTTON_TEXT_X;
|
||||
s_sql.login.textY = 12;
|
||||
s_sql.login.textEnum = MBT_ACCEPT;
|
||||
s_sql.login.textEnum = MBT_ACCEPT; // TODO needs own text
|
||||
s_sql.login.textcolor = CT_BLACK;
|
||||
s_sql.login.textcolor2 = CT_WHITE;
|
||||
s_sql.login.textStyle = UI_TINYFONT;
|
||||
|
||||
s_sql.user.generic.type = MTYPE_FIELD;
|
||||
s_sql.user.field.widthInChars = 16;
|
||||
s_sql.user.field.maxchars = 64;
|
||||
s_sql.user.generic.x = 260;
|
||||
s_sql.user.generic.y = 217;
|
||||
s_sql.user.field.style = UI_SMALLFONT;
|
||||
s_sql.user.field.titleEnum = MBT_ADMIN_ENTITY; // TODO ... needs own text
|
||||
s_sql.user.field.titlecolor = CT_WHITE;
|
||||
s_sql.user.field.textcolor = CT_WHITE;
|
||||
s_sql.user.field.textcolor2 = CT_LTGREY;
|
||||
|
||||
Menu_AddItem( &s_sql.menu, &s_sql.quitmenu );
|
||||
Menu_AddItem( &s_sql.menu, &s_sql.login );
|
||||
Menu_AddItem( &s_sql.menu, &s_sql.user);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue