ImpassableOptions.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. ** Command & Conquer Generals(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. #pragma once
  19. #ifndef __IMPASSABLEOPTIONS_H__
  20. #define __IMPASSABLEOPTIONS_H__
  21. class ImpassableOptions : public CDialog
  22. {
  23. public:
  24. enum { IDD = IDD_IMPASSABLEOPTIONS };
  25. public:
  26. ImpassableOptions(CWnd* pParent = NULL, Real defaultSlope = 45.0f);
  27. virtual ~ImpassableOptions();
  28. Real GetSlopeToShow() const { return m_slopeToShow; }
  29. Real GetDefaultSlope() const { return m_defaultSlopeToShow; }
  30. void SetDefaultSlopeToShow(Real slopeToShow) { m_slopeToShow = slopeToShow; }
  31. protected:
  32. Real m_slopeToShow; // Clamped in the range of [0,90]
  33. Real m_defaultSlopeToShow;
  34. Bool m_showImpassableAreas;
  35. Bool ValidateSlope(); // Returns TRUE if it was valid, FALSE if it had to adjust it.
  36. protected:
  37. virtual BOOL OnInitDialog();
  38. afx_msg void OnAngleChange();
  39. afx_msg void OnPreview();
  40. DECLARE_MESSAGE_MAP()
  41. };
  42. #endif /* __IMPASSABLEOPTIONS_H__ */