EditDialogueDialog.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. /*
  2. ** Command & Conquer Renegade(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_EDITDIALOGUEDIALOG_H__BC974F00_1204_4644_96D7_7BFC1BC5BBCC__INCLUDED_)
  19. #define AFX_EDITDIALOGUEDIALOG_H__BC974F00_1204_4644_96D7_7BFC1BC5BBCC__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. /////////////////////////////////////////////////////////////////////////////
  25. // Forward declarations
  26. /////////////////////////////////////////////////////////////////////////////
  27. class DialogueClass;
  28. class DialogueOptionClass;
  29. /////////////////////////////////////////////////////////////////////////////
  30. //
  31. // EditDialogueDialogClass
  32. //
  33. /////////////////////////////////////////////////////////////////////////////
  34. class EditDialogueDialogClass : public CDialog
  35. {
  36. public:
  37. EditDialogueDialogClass (CWnd *pParent = NULL);
  38. // Dialog Data
  39. //{{AFX_DATA(EditDialogueDialogClass)
  40. enum { IDD = IDD_EDIT_DIALOGUE };
  41. CSpinButtonCtrl m_SelectedWeightSpin;
  42. CSpinButtonCtrl m_SilenceWeightSpin;
  43. CListCtrl m_ListCtrl;
  44. //}}AFX_DATA
  45. // Overrides
  46. // ClassWizard generated virtual function overrides
  47. //{{AFX_VIRTUAL(EditDialogueDialogClass)
  48. protected:
  49. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  50. //}}AFX_VIRTUAL
  51. // Implementation
  52. protected:
  53. // Generated message map functions
  54. //{{AFX_MSG(EditDialogueDialogClass)
  55. virtual BOOL OnInitDialog();
  56. virtual void OnOK();
  57. afx_msg void OnAdd();
  58. afx_msg void OnDelete();
  59. afx_msg void OnDblclkOptionList(NMHDR* pNMHDR, LRESULT* pResult);
  60. afx_msg void OnDeleteitemOptionList(NMHDR* pNMHDR, LRESULT* pResult);
  61. afx_msg void OnItemchangedRemarkList(NMHDR* pNMHDR, LRESULT* pResult);
  62. afx_msg void OnDeltaposSelectedWeightSpin(NMHDR* pNMHDR, LRESULT* pResult);
  63. afx_msg void OnKillfocusSelectedWeightEdit();
  64. afx_msg void OnVScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. public:
  68. //////////////////////////////////////////////////////////////
  69. // Public methods
  70. //////////////////////////////////////////////////////////////
  71. void Set_Dialogue (DialogueClass *dialogue) { m_Dialogue = dialogue; }
  72. DialogueClass * Get_Dialogue (void) const { return m_Dialogue; }
  73. protected:
  74. ////////////////////////////////////////////////////////////////////
  75. // Protected methods
  76. ////////////////////////////////////////////////////////////////////
  77. void Update_Entry (int index);
  78. void Insert_Entry (DialogueOptionClass *option);
  79. void Update_Enabled_State (void);
  80. void Update_Current_Weight (void);
  81. private:
  82. //////////////////////////////////////////////////////////////
  83. // Private member data
  84. //////////////////////////////////////////////////////////////
  85. DialogueClass * m_Dialogue;
  86. };
  87. //{{AFX_INSERT_LOCATION}}
  88. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  89. #endif // !defined(AFX_EDITDIALOGUEDIALOG_H__BC974F00_1204_4644_96D7_7BFC1BC5BBCC__INCLUDED_)