Esempio n. 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();
}
Esempio n. 3
0
void IN_Init (void)
{
    in_mouse = Cvar_Get ("in_mouse", "1", CVAR_ARCHIVE);
    in_joystick = Cvar_Get ("in_joystick", "0", CVAR_ARCHIVE);
    m_filter = Cvar_Get ("m_filter", "0", 0);
    in_dgamouse = Cvar_Get ("in_dgamouse", "1", CVAR_ARCHIVE);
    in_menumouse = Cvar_Get ("in_menumouse", "0", CVAR_ARCHIVE);
    
    Cmd_AddCommand ("+mlook", IN_MLookDown);
    Cmd_AddCommand ("-mlook", IN_MLookUp);
    Cmd_AddCommand ("force_centerview", Force_CenterView_f);

    mx = my = 0.0;  
    
    if (in_mouse->value)
		mouse_avail = true;
    else
		mouse_avail = false;

    // Knightmare- added Psychospaz's menu mouse support
    UI_RefreshCursorMenu();
    UI_RefreshCursorLink();
}