/* ================= Reset_MenuDraw ================= */ static void Reset_MenuDraw(void) { UI_DrawNamedPic(142, 118, 359, 256, ART_FRAME); UI_DrawProportionalString(320, 194 + 10, "RESET GAME?", UI_CENTER | UI_INVERSE, color_red); UI_DrawProportionalString(s_reset.slashX, 265, "/", UI_LEFT | UI_INVERSE, color_red); Menu_Draw(&s_reset.menu); UI_DrawProportionalString(SCREEN_WIDTH / 2, 356 + PROP_HEIGHT * 0, "WARNING: This resets all of the", UI_CENTER | UI_SMALLFONT, color_yellow); UI_DrawProportionalString(SCREEN_WIDTH / 2, 356 + PROP_HEIGHT * 1, "single player game variables.", UI_CENTER | UI_SMALLFONT, color_yellow); UI_DrawProportionalString(SCREEN_WIDTH / 2, 356 + PROP_HEIGHT * 2, "Do this only if you want to", UI_CENTER | UI_SMALLFONT, color_yellow); UI_DrawProportionalString(SCREEN_WIDTH / 2, 356 + PROP_HEIGHT * 3, "start over from the beginning.", UI_CENTER | UI_SMALLFONT, color_yellow); }
/* ================= MessaheMenu_Draw ================= */ static void MessageMenu_Draw( void ) { int i,y; UI_DrawNamedPic( 142, 118, 359, 256, ART_CONFIRM_FRAME ); y = 188; for(i=0; s_confirm.lines[i]; i++) { UI_DrawProportionalString( 320, y, s_confirm.lines[i], s_confirm.style, color_red ); y += 18; } Menu_Draw( &s_confirm.menu ); if( s_confirm.draw ) { s_confirm.draw(); } }
static void DrawAwardsMedals(int max) { int n, medal, amount, x, y; char buf[16]; for(n = 0; n < max; n++){ x = medalLocations[n]; y = 64; medal = postgame.awardsEarned[n]; amount = postgame.awardsLevels[n]; UI_DrawNamedPic(x, y, 48, 48, ui_medalPicNames[medal]); if(medal == AWARD_ACCURACY) Q_sprintf(buf, sizeof(buf), "%i%%", amount); else{ if(amount == 1) continue; Q_sprintf(buf, sizeof(buf), "%i", amount); } UI_DrawString(x + 24, y + 52, buf, UI_CENTER, color_yellow); } }
void M_CDKey_Graphics (void) { UI_MenuFrame(&s_cdkey_menu); UI_Setup_MenuButtons(); ui.R_SetColor( colorTable[CT_DKPURPLE2]); UI_DrawHandlePic(30,203, 47, 121, uis.whiteShader); // Long left hand column square UI_DrawHandlePic(30,327, 47, 28, uis.whiteShader); // Long left hand column square UI_DrawHandlePic(30,358, 47, 31, uis.whiteShader); // Long left hand column square // Numbers for left hand column squares UI_DrawProportionalString( 73, 206, "ST-181",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); UI_DrawProportionalString( 73, 330, "65",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); UI_DrawProportionalString( 73, 361, "201",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); ui.R_SetColor( colorTable[CT_WHITE]); UI_DrawNamedPic(97, 160, 512, 256, ART_WORMHOLE); UI_DrawProportionalString( 611, 165, "WORMHOLE STRUCTURE", UI_RIGHT | UI_SMALLFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 419, 321, "POINT SINGULARITY", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 360, 221, "VERTERONE MEMBRANE", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 265, 329, "POSITIVE CTL REGION", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 199, 288, "NEGATIVE CTL REGION", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 287, 184, "RING SINGULARITY", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 158, 230, "FTR PIPELINE", UI_TINYFONT, colorTable[CT_LTORANGE]); ui.R_SetColor( colorTable[CT_DKBLUE1]); UI_DrawHandlePic( 80,358, 185, 18, uis.whiteShader); // Bar behind ENTER CD KEY UI_DrawHandlePic( 118,417, 128, 18, uis.whiteShader); // Bar behind ACCEPT UI_DrawHandlePic( 267, 376, 8, 59, uis.whiteShader); // Right hand side of box UI_DrawNamedPic(263, 358, 16, 32, ART_FRAME); UI_DrawProportionalString( 146, 358, "ENTER CD KEY", UI_SMALLFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 152, 418, "ACCEPT", UI_SMALLFONT, colorTable[CT_LTORANGE]); ui.R_SetColor( colorTable[CT_DKGREY2]); UI_DrawHandlePic( 95,383, 160, 20, uis.whiteShader); // Grey square to type in ui.R_SetColor( colorTable[CT_WHITE]); UI_DrawHandlePic( 95,402, 160, 1, uis.whiteShader); // White line to type above ui.R_SetColor( colorTable[CT_DKPURPLE1]); UI_DrawHandlePic( 516,208, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 541,208, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 566,208, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 591,208, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 516,399, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 541,399, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 566,399, 21, 8, uis.whiteShader); // Bar above labels UI_DrawHandlePic( 591,399, 21, 8, uis.whiteShader); // Bar above labels UI_DrawProportionalString( 516, 223, "DIM : 74156", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 237, "XYS DG : 21", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 251, "VGVH-A : 129430", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 275, "TTFN : 98231", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 289, "BB IO : 45", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 303, "R-T-PPL : 32", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 317, "B1 YOT : 810257", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 341, "XTR NTL: 171", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 355, "HGH NTL: 1348", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 369, "MED NTL: 45333", UI_TINYFONT, colorTable[CT_LTORANGE]); UI_DrawProportionalString( 516, 383, "LOW NTL: 29", UI_TINYFONT, colorTable[CT_LTORANGE]); // Menu frame numbers UI_DrawProportionalString( 74, 66, "67811",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); UI_DrawProportionalString( 74, 84, "5656",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); UI_DrawProportionalString( 74, 188, "76-0021",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); UI_DrawProportionalString( 74, 395, "456181",UI_RIGHT|UI_TINYFONT, colorTable[CT_BLACK]); }
static void Main_MenuDraw(void) { refdef_t refdef; refEntity_t ent; vec3_t origin; vec3_t angles; float adjust; float x, y, w, h; vec4_t color; qboolean connected = qtrue; vec4_t oldColor = {0.8, 0.8, 0.8, 1}; // FIXME dont call on every update... s_main.servers = (int) trap_Cvar_VariableValue("ma_servers"); s_main.players = (int) trap_Cvar_VariableValue("ma_players"); s_main.motd = UI_Cvar_VariableString("ma_motd"); if (!s_main.motd || !Q_stricmp(s_main.motd, "")) { s_main.motd = "Failed to connect to master server"; connected = qfalse; } // options the refdef memset(&refdef, 0, sizeof ( refdef)); refdef.rdflags = RDF_NOWORLDMODEL; AxisClear(refdef.viewaxis); x = 0; y = 0; w = 640; h = 120; UI_AdjustFrom640(&x, &y, &w, &h); refdef.x = x; refdef.y = y; refdef.width = w; refdef.height = h; adjust = 0; // JDC: Kenneth asked me to stop this 1.0 * sin( (float)uis.realtime / 1000 ); refdef.fov_x = 60 + adjust; refdef.fov_y = 19.6875 + adjust; refdef.time = uis.realtime; origin[0] = 300; origin[1] = 0; origin[2] = -32; trap_R_ClearScene(); // add the model memset(&ent, 0, sizeof (ent)); /*adjust = 5.0 * sin((float) uis.realtime / 5000); VectorSet(angles, 0, 180 + adjust, 0); AnglesToAxis(angles, ent.axis); ent.hModel = s_main.bannerModel; VectorCopy(origin, ent.origin); VectorCopy(origin, ent.lightingOrigin); ent.renderfx = RF_LIGHTING_ORIGIN | RF_NOSHADOW; VectorCopy(ent.origin, ent.oldorigin);*/ x = 0; y = 0; w = 640; h = 64; UI_FillRect(x, y, w, h, color_black); x = 16; y = 16; UI_DrawString(x, y, "Hazewood", UI_LEFT, color_green); x = 196; y = 28; if (connected) { UI_DrawString(x, y, va("%s", s_main.motd), UI_LEFT | UI_SMALLERFONT, color_white); } else { UI_DrawString(x, y, va("%s", s_main.motd), UI_LEFT | UI_SMALLERFONT, color_red); } x = 640 - 196 + 48; y = 12; if (s_main.servers > 0) { UI_DrawString(x, y, va("%i Servers", s_main.servers), UI_LEFT | UI_SMALLFONT, color_blue); } else { UI_DrawString(x, y, va("%i Servers", s_main.servers), UI_LEFT | UI_SMALLFONT, color_red); } y = 36; if (s_main.players > 0) { UI_DrawString(x, y, va("%i Players", s_main.players), UI_LEFT | UI_SMALLFONT, color_blue); } else { UI_DrawString(x, y, va("%i Players", s_main.players), UI_LEFT | UI_SMALLFONT, color_red); } x = 0; y = 480 - 64; w = 640; h = 64; UI_FillRect(x, y, w, h, color_black); x = 0; y = 64; w = 640; h = 480 - 128; if (!s_main.up) { s_main.fade -= ((float) uis.frametime) / 10.0f; } else { s_main.fade += ((float) uis.frametime) / 10.0f; } if (s_main.fade >= 1200.0f) { s_main.up = qfalse; s_main.currentScene++; if (s_main.currentScene >= MAX_MENU_SCENES) { s_main.currentScene = 0; } } if (s_main.fade <= -100.0f) { s_main.up = qtrue; } Vector4Copy(oldColor, color); UI_DrawHandlePic(x, y, w, h, trap_R_RegisterShaderNoMip(va("gfx/scenes/%i", s_main.currentScene))); color[3] = s_main.fade / 1000.0f; if (color[3] > 1) { color[3] = 1; } if (color[3] < 0) { color[3] = 0; } trap_R_SetColor(color); UI_DrawNamedPic(x, y, w, h, "gfx/colors/blue.jpg"); trap_R_SetColor(oldColor); trap_R_AddRefEntityToScene(&ent); trap_R_RenderScene(&refdef); if (strlen(s_errorMessage.errorMessage)) { UI_DrawProportionalString_AutoWrapped(320, 192, 600, 20, s_errorMessage.errorMessage, UI_CENTER | UI_SMALLFONT | UI_DROPSHADOW, menu_text_color); } else { Menu_Draw(&s_main.menu); } }