cl_dll/hud_numericdisplay.h
1112131415161718192021222324
#endif
#include
//-----------------------------------------------------------------------------
// Purpose: Base class for all the hud elements that are just a numeric display
// with some options for text and icons
//-----------------------------------------------------------------------------
class CHudNumericDisplay : public vgui::Panel
{
DECLARE_CLASS_SIMPLE( CHudNumericDisplay, vgui::Panel );
public:
CHudNumericDisplay(vgui::Panel *parent, const char *name);
111213141516171819202122232425
#endif
#include
#include "ff_panel.h"
//-----------------------------------------------------------------------------
// Purpose: Base class for all the hud elements that are just a numeric display
// with some options for text and icons
//-----------------------------------------------------------------------------
class CHudNumericDisplay : public vgui::FFPanel
{
DECLARE_CLASS_SIMPLE( CHudNumericDisplay, vgui::FFPanel );
public:
CHudNumericDisplay(vgui::Panel *parent, const char *name);
303132333435
void SetLabelText(const wchar_t *text);
void SetIndent(bool state);
virtual void Reset();
protected:
31323334353637383940414243
void SetLabelText(const wchar_t *text);
void SetIndent(bool state);
// So animation controller animations actually adjust the
// numbers' colors and not the entire panel that encapsulates the numbers
virtual void SetFgColor( Color color )
{
m_NumberColor = color;
}
virtual void Reset();
protected:
38394041424344
virtual void PaintLabel();
virtual void PaintNumbers(vgui::HFont font, int xpos, int ypos, int value);
private:
int m_iValue;
464748495051525354
virtual void PaintLabel();
virtual void PaintNumbers(vgui::HFont font, int xpos, int ypos, int value);
virtual void PaintNumbersRightAligned(vgui::HFont font, int xpos, int ypos, int value, int maxchars);
private:
int m_iValue;
48495051525354555657
bool m_bIndent;
CPanelAnimationVar( float, m_flBlur, "Blur", "0" );
CPanelAnimationVar( Color, m_TextColor, "TextColor", "FgColor" );
CPanelAnimationVar( Color, m_Ammo2Color, "Ammo2Color", "FgColor" );
CPanelAnimationVar( vgui::HFont, m_hNumberFont, "NumberFont", "HudNumbers" );
CPanelAnimationVar( vgui::HFont, m_hNumberGlowFont, "NumberGlowFont", "HudNumbersGlow" );
CPanelAnimationVar( vgui::HFont, m_hSmallNumberFont, "SmallNumberFont", "HudNumbersSmall" );
CPanelAnimationVar( vgui::HFont, m_hTextFont, "TextFont", "Default" );
58596061626364656667
bool m_bIndent;
CPanelAnimationVar( float, m_flBlur, "Blur", "0" );
CPanelAnimationVar( Color, m_NumberColor, /*"TextColor"*/ "NumberColor", "FgColor" );
CPanelAnimationVar( Color, m_Ammo2Color, "Ammo2Color", "FgColor" );
CPanelAnimationVar( vgui::HFont, m_hNumberFont, "NumberFont", "HudNumbers2" );
CPanelAnimationVar( vgui::HFont, m_hNumberGlowFont, "NumberGlowFont", "HudNumbersGlow" );
CPanelAnimationVar( vgui::HFont, m_hSmallNumberFont, "SmallNumberFont", "HudNumbersSmall" );
CPanelAnimationVar( vgui::HFont, m_hTextFont, "TextFont", "Default" );
626364656667
CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "2", "proportional_float" );
CPanelAnimationVarAliasType( float, digit2_xpos, "digit2_xpos", "98", "proportional_float" );
CPanelAnimationVarAliasType( float, digit2_ypos, "digit2_ypos", "16", "proportional_float" );
};
727374757677787980818283848586
CPanelAnimationVarAliasType( float, digit_ypos, "digit_ypos", "2", "proportional_float" );
CPanelAnimationVarAliasType( float, digit2_xpos, "digit2_xpos", "98", "proportional_float" );
CPanelAnimationVarAliasType( float, digit2_ypos, "digit2_ypos", "16", "proportional_float" );
// --> Mirv: Added for icons
protected:
CPanelAnimationVarAliasType( float, icon_xpos, "icon_xpos", "0", "proportional_float" );
CPanelAnimationVarAliasType( float, icon_ypos, "icon_ypos", "0", "proportional_float" );
CPanelAnimationVarAliasType( float, icon_width, "icon_width", "1", "proportional_float" );
CPanelAnimationVarAliasType( float, icon_height, "icon_height", "1", "proportional_float" );
// <-- Mirv: Added for icons
};