summaryrefslogtreecommitdiff
path: root/hammer/materialdlg.h
blob: 1a67a6e1d7d0c3a295c78b4b2baa3261f0174236 (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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose: 
//
//=============================================================================//

#ifndef MATERIALDLG_H
#define MATERIALDLG_H
#pragma once

#include "resource.h"
#include "smoothinggroupmgr.h"

//=============================================================================
//
// Face Smoothing Group Dialog
//
class CFaceSmoothingDlg : public CDialog
{
public:

	CFaceSmoothingDlg( CWnd *pParent = NULL );
	~CFaceSmoothingDlg();

	void UpdateControls( void );

	//{{AFX_DATA( CFaceSmoothingDlg )
	enum { IDD = IDD_SMOOTHING_GROUPS };
	//}}AFX_DATA

	//{{AFX_VIRTUAL( CFaceSmoothingDlg )
	virtual BOOL OnInitDialog( void );
	//}}AFX_VIRTUAL

protected:

	void InitButtonIDs( void );

	UINT GetSmoothingGroup( UINT uCmd );
	int GetActiveSmoothingGroup( void );

	void CheckGroupButtons( int *pGroupCounts, int nFaceCount );

	float GetEditBoxSmoothingAngle( void );
	void SetEditBoxSmoothingAngle( float flAngle );
	void UpdateSmoothingAngle( int *pGroupCounts, int nFaceCount );

	//{{AFX_MSG( CFaceSmoothingDlg )
	afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
	afx_msg void OnButtonApply( void );
	afx_msg BOOL OnButtonGroup( UINT uCmd );
	afx_msg void OnClose( void );
	afx_msg void OnDestroy( void );
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

private:

	UINT			m_ButtonIDs[MAX_SMOOTHING_GROUP_COUNT+1];			// Ids
	CRect			m_DialogPosRect;									// Save/Restore the window position.

	CBrush			m_Brush;
	bool			m_bColorOverride;
	bool			m_bColorSelectAll;
};


//=============================================================================
//
// Face Smoothing Group Visual Dialog
//
class CFaceSmoothingVisualDlg : public CDialog
{
public:

	CFaceSmoothingVisualDlg( CWnd *pParent = NULL );
	~CFaceSmoothingVisualDlg();

	//{{AFX_DATA( CFaceSmoothingVisualDlg )
	enum { IDD = IDD_SMOOTHING_GROUP_VISUAL };
	//}}AFX_DATA

	//{{AFX_VIRTUAL( CFaceSmoothingVisualDlg )
	virtual BOOL OnInitDialog( void );
	//}}AFX_VIRTUAL

protected:

	void InitButtonIDs( void );
	UINT GetSmoothingGroup( UINT uCmd );

	//{{AFX_MSG( CFaceSmoothingDlg )
	afx_msg BOOL OnButtonGroup( UINT uCmd );
	//}}AFX_MSG

	DECLARE_MESSAGE_MAP()

private:

	UINT			m_ButtonIDs[MAX_SMOOTHING_GROUP_COUNT+1];			// Ids
};

#endif // MATERIALDLG_H