summaryrefslogtreecommitdiff
path: root/game/client/tf/vgui/modelimagepanel.h
blob: 4c2ede0f774e284640c39552bb8e6e519494010b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================
#ifndef MODELIMAGEPANEL_H
#define MODELIMAGEPANEL_H
#ifdef _WIN32
#pragma once
#endif

#include "basemodel_panel.h"

class CIconRenderReceiver;

class CModelImagePanel : public CBaseModelPanel
{
DECLARE_CLASS_SIMPLE( CModelImagePanel, CBaseModelPanel );

public:

	// Constructor, Destructor.
	CModelImagePanel( vgui::Panel *pParent, const char *pName );
	virtual ~CModelImagePanel();

	virtual void PerformLayout() OVERRIDE;
	virtual void Paint() OVERRIDE;
	virtual void OnSizeChanged( int wide, int tall ) OVERRIDE;

	virtual void SetMDL( MDLHandle_t handle, void *pProxyData = NULL ) OVERRIDE;
	virtual void SetMDL( const char *pMDLName, void *pProxyData = NULL ) OVERRIDE;
	void SetMDLBody( unsigned int nBody );
	void SetMDLSkin( int nSkin );

	void InvalidateImage();

private:
	CIconRenderReceiver *m_pCachedIcon;
	IMaterial			*m_pCachedMaterial;
	int					m_iCachedTextureID;
};

#endif // MODELIMAGEPANEL_H