summaryrefslogtreecommitdiff
path: root/game/client/econ/store/store_page_halloween.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/econ/store/store_page_halloween.cpp
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'game/client/econ/store/store_page_halloween.cpp')
-rw-r--r--game/client/econ/store/store_page_halloween.cpp85
1 files changed, 85 insertions, 0 deletions
diff --git a/game/client/econ/store/store_page_halloween.cpp b/game/client/econ/store/store_page_halloween.cpp
new file mode 100644
index 0000000..a039b4d
--- /dev/null
+++ b/game/client/econ/store/store_page_halloween.cpp
@@ -0,0 +1,85 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+//=============================================================================//
+
+
+#include "cbase.h"
+#include "store/store_page_halloween.h"
+#include "vgui/ISurface.h"
+#include "vgui/IInput.h"
+#include "vgui/ILocalize.h"
+#include "c_tf_player.h"
+#include "gamestringpool.h"
+#include "tf_item_inventory.h"
+#include "econ_item_system.h"
+#include "item_model_panel.h"
+#include "store/store_panel.h"
+#include "store_preview_item.h"
+#include "store_viewcart.h"
+#include "c_tf_gamestats.h"
+
+// memdbgon must be the last include file in a .cpp file!!!
+#include <tier0/memdbgon.h>
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CTFStorePage_SpecialPromo::CTFStorePage_SpecialPromo( Panel *parent, const CEconStoreCategoryManager::StoreCategory_t *pPageData ) : BaseClass( parent, pPageData )
+{
+ pszResFile = pPageData->m_pchPageRes;
+}
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+/*
+void CTFStorePage_SpecialPromo::OrderItemsForDisplay( CUtlVector<const econ_store_entry_t *>& vecItems ) const
+{
+ vecItems.Sort( &ItemDisplayOrderSort_UseSortOverride );
+}
+*/
+
+//-----------------------------------------------------------------------------
+// Purpose:
+//-----------------------------------------------------------------------------
+CTFStorePage_Popular::CTFStorePage_Popular( Panel *parent, const CEconStoreCategoryManager::StoreCategory_t *pPageData ) : BaseClass( parent, pPageData )
+{
+}
+
+//-----------------------------------------------------------------------------
+// Purpose: The popular page draws its list of items from the overall popular items list.
+//-----------------------------------------------------------------------------
+void CTFStorePage_Popular::UpdateFilteredItems( void )
+{
+ m_FilteredEntries.Purge();
+ m_vecFilterCounts.SetCount( GetNumPrimaryFilters() );
+ if ( !m_vecFilterCounts.Count() )
+ return;
+
+ FOR_EACH_VEC( m_vecFilterCounts, i )
+ {
+ m_vecFilterCounts[i] = 0;
+ }
+
+ CStorePanel *pStorePanel = EconUI()->GetStorePanel();
+ if ( !pStorePanel )
+ return;
+
+ // Add all popular items
+ const CUtlVector<uint32>& popularItems = pStorePanel->GetPopularItems();
+
+ for ( int i=0; i<popularItems.Count(); ++i )
+ {
+ const econ_store_entry_t *pEntry = pStorePanel->GetPriceSheet()->GetEntry( popularItems[i] );
+ m_FilteredEntries.AddToTail( pEntry );
+ }
+
+ FOR_EACH_VEC( m_vecItemPanels, idx )
+ {
+ m_vecItemPanels[idx].m_pItemModelPanel->SetShowQuantity( false );
+ }
+
+ m_pFilterComboBox->SetVisible( false );
+} \ No newline at end of file