void CASW_VGUI_Computer_Frame::OnCommand( const char *pCommand )
{
	C_ASW_Player *pPlayer = C_ASW_Player::GetLocalASWPlayer();

	if ( !Q_stricmp( pCommand, "Cancel" ) )
	{
		if ( m_pMenuPanel && m_pMenuPanel->m_hCurrentPage.Get() )
		{
			m_pMenuPanel->SetHackOption( 0 );
		}
		else
		{
			if ( pPlayer )
			{
				pPlayer->StopUsing();
			}
		}
	}
	else if ( !Q_stricmp( pCommand, "Logoff" ) )
	{
		if ( pPlayer )
		{
			pPlayer->StopUsing();
		}
	}

	BaseClass::OnCommand( pCommand );
}
void CASW_VGUI_Computer_Menu::OnCommand(char const* command)
{	
	if (!strnicmp(command, "Option", 6))
	{
		int iControl = atoi(command+6);
		ClickedMenuOption(iControl);
		return;
	}
	else if ( !Q_stricmp( command, "Cancel" ) )
	{
		if ( m_hCurrentPage.Get() )
		{
			SetHackOption( 0 );
		}
		else
		{
			C_ASW_Player *pPlayer = C_ASW_Player::GetLocalASWPlayer();
			if ( pPlayer )
			{
				pPlayer->StopUsing();
			}
		}
	}
	
	BaseClass::OnCommand(command);
}
bool CASW_VGUI_Computer_Frame::MouseClick(int x, int y, bool bRightClick, bool bDown)
{
	if (m_pLogoffLabel->IsCursorOver() && m_pLogoffLabel->IsVisible() )
	{
		C_ASW_Player *pPlayer = C_ASW_Player::GetLocalASWPlayer();
		if (pPlayer)
			pPlayer->StopUsing();
		return true;
	}

	return true;	// swallow click
}