Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
2.7 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef TEXTUREBROWSER_H
  8. #define TEXTUREBROWSER_H
  9. #pragma once
  10. #include "resource.h"
  11. #include "AutoSelCombo.h"
  12. #include "texturewindow.h"
  13. class CTextureBrowser : public CDialog
  14. {
  15. public:
  16. CTextureBrowser(CWnd *pParent);
  17. //{{AFX_DATA(CTextureBrowser)
  18. enum { IDD = IDD_TEXTURES };
  19. //}}AFX_DATA
  20. void SetInitialTexture(LPCTSTR);
  21. inline CString GetCurTexture(void);
  22. void WriteSettings();
  23. void SetUsed(BOOL);
  24. void SaveAndExit();
  25. void SetFilter(const char *pszFilter);
  26. void SetTextureFormat(TEXTUREFORMAT eTextureFormat);
  27. CTextureWindow m_cTextureWindow; // dvs: make protected
  28. protected:
  29. //{{AFX_MSG(CTextureBrowser)
  30. afx_msg void OnSize(UINT nType, int cx, int cy);
  31. afx_msg void OnSelendokTexturesize();
  32. virtual BOOL OnInitDialog();
  33. afx_msg void OnClose();
  34. afx_msg void OnTimer(UINT nIDEvent);
  35. afx_msg void OnUsed();
  36. afx_msg void OnReplace();
  37. afx_msg void OnMark();
  38. afx_msg void OnFilterOpaque();
  39. afx_msg void OnFilterTranslucent();
  40. afx_msg void OnFilterSelfIllum();
  41. afx_msg void OnFilterEnvmask();
  42. afx_msg void OnShowErrors();
  43. afx_msg void OnOpenSource();
  44. afx_msg void OnExploreToSource();
  45. afx_msg void OnReload();
  46. afx_msg void OnChangeFilterOrKeywords(void);
  47. afx_msg void OnUpdateFiltersNOW();
  48. afx_msg void OnUpdateKeywordsNOW(void);
  49. afx_msg LRESULT OnTextureWindowDblClk(WPARAM wParam, LPARAM lParam);
  50. afx_msg LRESULT OnTexturewindowSelchange(WPARAM, LPARAM);
  51. //}}AFX_MSG
  52. DECLARE_MESSAGE_MAP()
  53. afx_msg void OnCancel();
  54. static CStringArray m_FilterHistory;
  55. static int m_nFilterHistory;
  56. static char m_szLastKeywords[MAX_PATH]; // The text in the keywords combo when the user last exited the browser.
  57. CComboBox m_cSizeList;
  58. CStatic m_cCurName;
  59. CStatic m_cCurDescription;
  60. CButton m_cUsed;
  61. char szInitialTexture[128];
  62. char m_szNameFilter[128]; // Overrides the name filter history for a single browser session.
  63. DWORD m_uLastFilterChange;
  64. BOOL m_bFilterChanged;
  65. BOOL m_bUsed;
  66. CAutoSelComboBox m_cFilter;
  67. CAutoSelComboBox m_cKeywords;
  68. CButton m_FilterOpaque;
  69. CButton m_FilterTranslucent;
  70. CButton m_FilterSelfIllum;
  71. CButton m_FilterEnvMask;
  72. CButton m_ShowErrors;
  73. TextureWindowTexList m_TextureSubList; // Holds a specific sublist of textures to browse.
  74. };
  75. //-----------------------------------------------------------------------------
  76. // Purpose: Returns the name of the currently selected texture.
  77. //-----------------------------------------------------------------------------
  78. CString CTextureBrowser::GetCurTexture(void)
  79. {
  80. return(CString(m_cTextureWindow.szCurTexture));
  81. }
  82. #endif // TEXTUREBROWSER_H