summaryrefslogtreecommitdiff
path: root/game/client/dod/dod_hud_history_resource.cpp
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /game/client/dod/dod_hud_history_resource.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/dod/dod_hud_history_resource.cpp')
-rw-r--r--game/client/dod/dod_hud_history_resource.cpp113
1 files changed, 113 insertions, 0 deletions
diff --git a/game/client/dod/dod_hud_history_resource.cpp b/game/client/dod/dod_hud_history_resource.cpp
new file mode 100644
index 0000000..41a6753
--- /dev/null
+++ b/game/client/dod/dod_hud_history_resource.cpp
@@ -0,0 +1,113 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Item pickup history displayed onscreen when items are picked up.
+//
+// $NoKeywords: $
+//=============================================================================//
+#include "cbase.h"
+#include "history_resource.h"
+#include "hud_macros.h"
+#include <vgui_controls/Controls.h>
+#include <vgui/ISurface.h>
+#include "iclientmode.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include "tier0/memdbgon.h"
+
+using namespace vgui;
+
+extern ConVar hud_drawhistory_time;
+
+#define HISTORY_PICKUP_GAP (m_iHistoryGap + 5)
+#define HISTORY_PICKUP_PICK_HEIGHT (32 + (m_iHistoryGap * 2))
+#define HISTORY_PICKUP_HEIGHT_MAX (GetTall() - 100)
+#define ITEM_GUTTER_SIZE 48
+
+
+DECLARE_HUDELEMENT( CHudHistoryResource );
+DECLARE_HUD_MESSAGE( CHudHistoryResource, ItemPickup );
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CHudHistoryResource::CHudHistoryResource( const char *pElementName ) :
+ CHudElement( pElementName ), BaseClass( NULL, "HudHistoryResource" )
+{
+ vgui::Panel *pParent = g_pClientMode->GetViewport();
+ SetParent( pParent );
+ SetHiddenBits( HIDEHUD_MISCSTATUS );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+// Input : *pScheme -
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::ApplySchemeSettings( IScheme *pScheme )
+{
+ BaseClass::ApplySchemeSettings( pScheme );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::Init( void )
+{
+ HOOK_HUD_MESSAGE( CHudHistoryResource, ItemPickup );
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::Reset( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Set a new minimum size gap between history icons
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::SetHistoryGap( int iNewHistoryGap )
+{
+}
+
+void CHudHistoryResource::AddToHistory( int iType, int iId, int iCount )
+{
+}
+
+void CHudHistoryResource::AddToHistory( int iType, const char *szName, int iCount )
+{
+}
+
+void CHudHistoryResource::AddToHistory( C_BaseCombatWeapon *weapon )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Handle an item pickup event from the server
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::MsgFunc_ItemPickup( bf_read &msg )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: If there aren't any items in the history, clear it out.
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::CheckClearHistory( void )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+bool CHudHistoryResource::ShouldDraw( void )
+{
+ return false;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: Draw the pickup history
+//-----------------------------------------------------------------------------
+void CHudHistoryResource::Paint( void )
+{
+}
+
+