BlendMaterial.h 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_BlendMaterial_H__D3FF66C5_711D_4DAC_8A29_5EAAB5C3A23E__INCLUDED_)
  19. #define AFX_BlendMaterial_H__D3FF66C5_711D_4DAC_8A29_5EAAB5C3A23E__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // BlendMaterial.h : header file
  24. //
  25. #include "WBPopupSlider.h"
  26. #include "TerrainSwatches.h"
  27. #include "OptionsPanel.h"
  28. class WorldHeightMapEdit;
  29. /////////////////////////////////////////////////////////////////////////////
  30. // BlendMaterial dialog
  31. class BlendMaterial : public COptionsPanel
  32. {
  33. // Construction
  34. public:
  35. BlendMaterial(CWnd* pParent = NULL); // standard constructor
  36. // Dialog Data
  37. //{{AFX_DATA(BlendMaterial)
  38. enum { IDD = IDD_BLEND_MATERIAL };
  39. // NOTE: the ClassWizard will add data members here
  40. //}}AFX_DATA
  41. // Overrides
  42. // ClassWizard generated virtual function overrides
  43. //{{AFX_VIRTUAL(BlendMaterial)
  44. protected:
  45. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  46. virtual void OnOK(){return;}; ///< Modeless dialogs don't OK, so eat this for modeless.
  47. virtual void OnCancel(){return;}; ///< Modeless dialogs don't close on ESC, so eat this for modeless.
  48. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. protected:
  52. enum {MIN_TILE_SIZE=2, MAX_TILE_SIZE = 100};
  53. // Generated message map functions
  54. //{{AFX_MSG(BlendMaterial)
  55. virtual BOOL OnInitDialog();
  56. //}}AFX_MSG
  57. DECLARE_MESSAGE_MAP()
  58. protected:
  59. static BlendMaterial *m_staticThis;
  60. Bool m_updating;
  61. static Int m_currentBlendTexture;
  62. CTreeCtrl m_terrainTreeView;
  63. protected:
  64. void updateTextures(void);
  65. void addTerrain(const char *pPath, Int terrainNdx, HTREEITEM parent);
  66. HTREEITEM findOrAdd(HTREEITEM parent, char *pLabel);
  67. public:
  68. static Int getBlendTexClass(void) {return m_currentBlendTexture;}
  69. static void setBlendTexClass(Int texClass);
  70. public:
  71. Bool setTerrainTreeViewSelection(HTREEITEM parent, Int selection);
  72. };
  73. //{{AFX_INSERT_LOCATION}}
  74. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  75. #endif // !defined(AFX_BlendMaterial_H__D3FF66C5_711D_4DAC_8A29_5EAAB5C3A23E__INCLUDED_)