Follow along with the video below to see how to install our site as a web app on your home screen.
Note: this_feature_currently_requires_accessing_site_using_safari
"yuv" //this is the shader to use
{
}
"hsv"
{
}
#include "cbase.h"
#include "hudelement.h"
#include "hud_macros.h"
#include "iclientmode.h"
#include "view.h"
using namespace vgui;
#include <vgui_controls/Panel.h>
#include <vgui_controls/Frame.h>
#include <vgui/IScheme.h>
#include <vgui/ISurface.h>
#include <vgui/ILocalize.h>
// memdbgon must be the last include file in a .cpp file!!!
#include "tier0/memdbgon.h"
//=============================================================================
// Dodo's magical screen filter thing - edited from Valve's code by Angry Lawyer
//=============================================================================
class CHudFilter : public CHudElement, public vgui::Panel
{
public:
DECLARE_CLASS_SIMPLE( CHudFilter, vgui::Panel );
CHudFilter( const char *name );
virtual bool ShouldDraw();
virtual void Paint();
virtual void VidInit();
virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
private:
CHudTexture *m_pFilterTexture;
Color m_clrIcon;
};
DECLARE_HUDELEMENT( CHudFilter );
CHudFilter::CHudFiler( const char *pName ) :
vgui::Panel( NULL, "hudfilter" ), CHudElement( pName )
{
SetParent( g_pClientMode->GetViewport() );
m_pVoiceIcon = NULL;
SetHiddenBits( 0 );
m_clrIcon = Color(255,255,255,255);
}
void CHudFilter::ApplySchemeSettings(vgui::IScheme *pScheme)
{
BaseClass::ApplySchemeSettings( pScheme );
SetBgColor( Color( 0, 0, 0, 0 ) );
}
void CHudFilter::VidInit( void )
{
m_pFilterTexture = gHUD.GetIcon( "HudFilter" );
}
bool CHudFilter::ShouldDraw()
{
return true;
}
void CHudFilter::Paint()
{
if( !m_pFilterTexture )
return;
int x, y, w, h;
GetBounds( x, y, w, h );
m_pFilterTexture->DrawSelf( 0, 0, w, h, m_clrIcon );
}
HudFilter
{
"fieldName" "HudFilter"
"xpos" "0"
"ypos" "0"
"wide" "1024"
"tall" "768"
"visible" "1"
"enabled" "1"
}