// // HU_MessageDraw // // Drawer for the player message widget. // static void HU_MessageDraw(hu_widget_t *widget) { int i, y; hu_msgwidget_t *mw = (hu_msgwidget_t *)widget; if(!showMessages) return; // go down a bit if chat active y = chat_active ? 8 : 0; for(i = 0; i < mw->current_messages; i++, y += 8) { int x = 0; char *msg = mw->messages[i]; // haleyjd 12/26/02: center messages in proper gamemodes // haleyjd 08/26/12: center also if in widescreen modes if(GameModeInfo->flags & GIF_CENTERHUDMSG || vbscreen.getVirtualAspectRatio() > 4 * FRACUNIT / 3) { x = (SCREENWIDTH - V_FontStringWidth(hud_font, msg)) >> 1; } // haleyjd 06/04/05: use V_FontWriteTextColored like it should. // Color codes within strings will still override the default. V_FontWriteTextColored(hud_font, msg, mess_colour, x, y, &subscreen43); }
// // MN_SkinInstructions // // Draws some v_font strings to the screen to tell the user how // to operate this beast. // static void MN_SkinInstructions() { const char *msg = FC_RED "skin viewer"; int x = 160 - V_FontStringWidth(menu_font_big, msg) / 2; int y = 8; int color = GameModeInfo->titleColor; // draw a title at the top, too if(GameModeInfo->flags & GIF_SHADOWTITLES) { V_FontWriteTextShadowed(menu_font_big, msg, x, y, &subscreen43, color); } else { V_FontWriteTextColored(menu_font_big, msg, color, x, y, &subscreen43); } // haleyjd 05/29/06: rewrote to be binding neutral and to draw all of // it with one call to V_FontWriteText instead of five. V_FontWriteText(menu_font_normal, "Instructions:\n" FC_GRAY "left" FC_RED " = rotate left, " FC_GRAY "right" FC_RED " = rotate right\n" FC_GRAY "ctrl" FC_RED " = fire, " FC_GRAY "p" FC_RED " = pain, " FC_GRAY "d" FC_RED " = die, " FC_GRAY "x" FC_RED " = gib\n" FC_GRAY "space" FC_RED " = respawn, " FC_GRAY "h" FC_RED " = half-speed\n" FC_GRAY "toggle or previous" FC_RED " = exit", 4, INSTR_Y, &subscreen43); }