Example #1
0
/*
 * =================
 * UI_Draw
 * =================
 */
void UI_Draw(void)
{
    if (cls.key_dest != key_menu)
    {
        return;
    }

    // dim everything behind it down
    if ((cl.cinematictime > 0) || (cls.state == ca_disconnected))
    {
        if (R_DrawFindPic("/gfx/ui/menu_background.pcx"))
        {
            R_DrawStretchPic(0, 0, viddef.width, viddef.height, "/gfx/ui/menu_background.pcx", 1.0);
        }
        else
        {
            R_DrawFill(0, 0, viddef.width, viddef.height, 0, 0, 0, 255);
        }
    }
    // ingame menu uses alpha
    else if (R_DrawFindPic("/gfx/ui/menu_background.pcx"))
    {
        R_DrawStretchPic(0, 0, viddef.width, viddef.height, "/gfx/ui/menu_background.pcx", menu_alpha->value);
    }
    else
    {
        R_DrawFill(0, 0, viddef.width, viddef.height, 0, 0, 0, (int)(menu_alpha->value * 255));
    }

    // Knigthmare- added Psychospaz's mouse support
    UI_RefreshCursorMenu();

    m_drawfunc();

    // delay playing the enter sound until after the
    // menu has been drawn, to avoid delay while
    // caching images
    if (m_entersound)
    {
        S_StartLocalSound(menu_in_sound);
        m_entersound = false;
    }

    // Knigthmare- added Psychospaz's mouse support
    //menu cursor for mouse usage :)
    UI_Draw_Cursor();
}
/*
=================
UI_Draw
=================
*/
void UI_Draw (void)
{
	if (cls.key_dest != key_menu)
		return;

	// scaled menu stuff
	//SCR_InitScreenScale();

	// repaint everything next frame
	SCR_DirtyScreen ();

	// dim everything behind it down
	if (cl.cinematictime > 0 || cls.state == ca_disconnected)
	{
		//bc removing this background!!!
		/*
		if (R_DrawFindPic("/gfx/menu_background.pcx")) {
			R_DrawStretchPic (0, 0, viddef.width, viddef.height, "/gfx/menu_background.pcx", 1.0);
			//R_DrawFadeScreen ();
		}
		else*/
			R_DrawFill2 (0,0,viddef.width, viddef.height, 0,0,0,255);
	}
	// ingame menu uses alpha
	//else if (R_DrawFindPic("/gfx/menu_background.pcx"))
	//	R_DrawStretchPic (0, 0, viddef.width, viddef.height, "/gfx/menu_background.pcx", menu_alpha->value);
	else
		R_DrawFadeScreen ();

	// Knigthmare- added Psychospaz's mouse support
	UI_RefreshCursorMenu();

	m_drawfunc ();

	// delay playing the enter sound until after the
	// menu has been drawn, to avoid delay while
	// caching images
	if (m_entersound)
	{
		S_StartLocalSound( menu_in_sound );
		m_entersound = false;
	}

	// Knigthmare- added Psychospaz's mouse support
	//menu cursor for mouse usage :)
	UI_Draw_Cursor();
}