summaryrefslogtreecommitdiff
path: root/gameui/TGAImagePanel.h
blob: 1c8d36ef887d36e17dfccaff6fc0dc402b30ec51 (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
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef TGAIMAGEPANEL_H
#define TGAIMAGEPANEL_H
#ifdef _WIN32
#pragma once
#endif

#include "vgui_controls/Panel.h"

using namespace vgui;

//-----------------------------------------------------------------------------
// Purpose: Displays a tga image
//-----------------------------------------------------------------------------
class CTGAImagePanel : public vgui::Panel
{
	DECLARE_CLASS_SIMPLE( CTGAImagePanel, vgui::Panel );

public:
	CTGAImagePanel( vgui::Panel *parent, const char *name );

	~CTGAImagePanel();

	void SetTGA( const char *filename );
	void SetTGANonMod( const char *filename );

	virtual void Paint( void );

private:
	int m_iTextureID;
	int m_iImageWidth, m_iImageHeight;
	bool m_bHasValidTexture, m_bLoadedTexture;
	char m_szTGAName[256];
};

#endif //TGAIMAGEPANEL_H