void PlayerConfig_DrawSkinSelection (void) { char scratch[MAX_QPATH]; float icon_x = SCREEN_WIDTH*0.5 - 5; //width - 325 float icon_y = SCREEN_HEIGHT - 108; float icon_offset = 0; float x, y, w, h; int i, count, color[3]; TextColor((int)Cvar_VariableValue("alt_text_color"), &color[0], &color[1], &color[2]); if (s_pmi[s_player_model_box.curvalue].nskins<NUM_SKINBOX_ITEMS || s_player_skin_box.curvalue<4) i=0; else if (s_player_skin_box.curvalue > s_pmi[s_player_model_box.curvalue].nskins-4) i=s_pmi[s_player_model_box.curvalue].nskins-NUM_SKINBOX_ITEMS; else i=s_player_skin_box.curvalue-3; // left arrow if (i>0) Com_sprintf (scratch, sizeof(scratch), "/gfx/ui/arrows/arrow_left.pcx"); else Com_sprintf (scratch, sizeof(scratch), "/gfx/ui/arrows/arrow_left_d.pcx"); SCR_DrawPic (icon_x-39, icon_y+2, 32, 32, ALIGN_CENTER, scratch, 1.0); // background SCR_DrawFill (icon_x-3, icon_y-3, NUM_SKINBOX_ITEMS*34+4, 38, ALIGN_CENTER, 0,0,0,255); if (R_DrawFindPic("/gfx/ui/listbox_background.pcx")) { x = icon_x-2; y = icon_y-2; w = NUM_SKINBOX_ITEMS*34+2; h = 36; SCR_AdjustFrom640 (&x, &y, &w, &h, ALIGN_CENTER); R_DrawTileClear ((int)x, (int)y, (int)w, (int)h, "/gfx/ui/listbox_background.pcx"); } else SCR_DrawFill (icon_x-2, icon_y-2, NUM_SKINBOX_ITEMS*34+2, 36, ALIGN_CENTER, 60,60,60,255); for (count=0; count<NUM_SKINBOX_ITEMS; i++,count++) { if (i<0 || i>=s_pmi[s_player_model_box.curvalue].nskins) continue; Com_sprintf (scratch, sizeof(scratch), "/players/%s/%s_i.pcx", s_pmi[s_player_model_box.curvalue].directory, s_pmi[s_player_model_box.curvalue].skindisplaynames[i] ); if (i==s_player_skin_box.curvalue) SCR_DrawFill (icon_x + icon_offset-1, icon_y-1, 34, 34, ALIGN_CENTER, color[0],color[1],color[2],255); SCR_DrawPic (icon_x + icon_offset, icon_y, 32, 32, ALIGN_CENTER, scratch, 1.0); icon_offset += 34; } // right arrow icon_offset = NUM_SKINBOX_ITEMS*34; if (s_pmi[s_player_model_box.curvalue].nskins-i>0) Com_sprintf (scratch, sizeof(scratch), "/gfx/ui/arrows/arrow_right.pcx"); else Com_sprintf (scratch, sizeof(scratch), "/gfx/ui/arrows/arrow_right_d.pcx"); SCR_DrawPic (icon_x+icon_offset+5, icon_y+2, 32, 32, ALIGN_CENTER, scratch, 1.0); }
void DrawMenuCrosshair (void) { SCR_DrawFill (SCREEN_WIDTH*0.5 - 18, s_options_screen_menu.y + 42, 36, 36, ALIGN_CENTER, 60,60,60,255); SCR_DrawFill (SCREEN_WIDTH*0.5 - 17, s_options_screen_menu.y + 43, 34, 34, ALIGN_CENTER, 0,0,0,255); if (s_options_screen_crosshair_box.curvalue < 1) return; SCR_DrawPic (SCREEN_WIDTH*0.5-16, s_options_screen_menu.y + 44, 32, 32, ALIGN_CENTER, crosshair_names[s_options_screen_crosshair_box.curvalue], 1.0); }
void Menu_DrawStatusBar (const char *string) { if (string) { int l = strlen( string ); SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+2), SCREEN_WIDTH, MENU_FONT_SIZE+2, ALIGN_BOTTOM_STRETCH, 60,60,60,255 ); SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, 1, ALIGN_BOTTOM_STRETCH, 0,0,0,255 ); SCR_DrawString( SCREEN_WIDTH/2-(l/2)*MENU_FONT_SIZE, SCREEN_HEIGHT-(MENU_FONT_SIZE+1), ALIGN_BOTTOM, string, 255 ); } else SCR_DrawFill( 0, SCREEN_HEIGHT-(MENU_FONT_SIZE+3), SCREEN_WIDTH, MENU_FONT_SIZE+3, ALIGN_BOTTOM_STRETCH, 0,0,0,255 ); }
void DrawSaveshot(qboolean loadmenu) { char shotname [MAX_QPATH]; char mapshotname [MAX_QPATH]; int i; if (loadmenu) { i = s_loadgame_actions[s_loadgame_menu.cursor].generic.localdata[0]; } else { i = s_savegame_actions[s_savegame_menu.cursor].generic.localdata[0]; } SCR_DrawFill(SCREEN_WIDTH / 2 + 44, SCREEN_HEIGHT / 2 - 60, 244, 184, ALIGN_CENTER, 60, 60, 60, 255); if (m_savevalid[i] && m_saveshotvalid[i]) { Com_sprintf(shotname, sizeof(shotname), "/save/kmq2save%i/shot.jpg", i); SCR_DrawPic(SCREEN_WIDTH / 2 + 46, SCREEN_HEIGHT / 2 - 58, 240, 180, ALIGN_CENTER, shotname, 1.0); } else if (loadmenu && (i == 0) && m_savevalid[i] && m_mapshotvalid) // autosave shows mapshot { Com_sprintf(mapshotname, sizeof(mapshotname), "/levelshots/%s.pcx", m_mapname); SCR_DrawPic(SCREEN_WIDTH / 2 + 46, SCREEN_HEIGHT / 2 - 58, 240, 180, ALIGN_CENTER, mapshotname, 1.0); } else if (m_saveshotvalid[MAX_SAVEGAMES]) { SCR_DrawPic(SCREEN_WIDTH / 2 + 46, SCREEN_HEIGHT / 2 - 58, 240, 180, ALIGN_CENTER, "/gfx/ui/noscreen.pcx", 1.0); } else { SCR_DrawFill(SCREEN_WIDTH / 2 + 46, SCREEN_HEIGHT / 2 - 58, 240, 180, ALIGN_CENTER, 0, 0, 0, 255); } }
void MenuList_Draw (menulist_s *l) { const char **n; int y = 0, alpha = mouseOverAlpha(&l->generic); Menu_DrawStringR2LDark (l->generic.x + l->generic.parent->x - 2*MENU_FONT_SIZE, l->generic.y + l->generic.parent->y, l->generic.name, alpha); n = l->itemnames; // SCR_DrawFill (l->generic.parent->x + l->generic.x - 112, l->generic.parent->y + l->generic.y + (l->curvalue+1)*MENU_LINE_SIZE, // 128, MENU_LINE_SIZE, ALIGN_CENTER, 16); SCR_DrawFill (l->generic.parent->x + l->generic.x - 112, l->generic.parent->y + l->generic.y + (l->curvalue+1)*MENU_LINE_SIZE, 128, MENU_LINE_SIZE, ALIGN_CENTER, color8red(16), color8green(16), color8blue(16), 255); while (*n) { Menu_DrawStringR2LDark (l->generic.x + l->generic.parent->x + LCOLUMN_OFFSET, l->generic.y + l->generic.parent->y + y + MENU_LINE_SIZE, *n, alpha); n++; y += MENU_LINE_SIZE; } }