2
0

menudialog.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  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. /***********************************************************************************************
  19. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Combat *
  23. * *
  24. * $Archive:: /Commando/Code/wwui/menudialog.h $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 10/25/01 5:15p $*
  29. * *
  30. * $Revision:: 8 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef __MENU_DIALOG_H
  39. #define __MENU_DIALOG_H
  40. #include "dialogbase.h"
  41. #include "wwstring.h"
  42. ////////////////////////////////////////////////////////////////
  43. // Forward declarations
  44. ////////////////////////////////////////////////////////////////
  45. class MenuBackDropClass;
  46. ////////////////////////////////////////////////////////////////
  47. //
  48. // MenuDialogClass
  49. //
  50. ////////////////////////////////////////////////////////////////
  51. class MenuDialogClass : public DialogBaseClass
  52. {
  53. public:
  54. ////////////////////////////////////////////////////////////////
  55. // Public constructors/destructors
  56. ////////////////////////////////////////////////////////////////
  57. MenuDialogClass (int res_id);
  58. virtual ~MenuDialogClass (void);
  59. ////////////////////////////////////////////////////////////////
  60. // Public methods
  61. ////////////////////////////////////////////////////////////////
  62. //
  63. // Initialization
  64. //
  65. static void Initialize (void);
  66. static void Shutdown (void);
  67. //
  68. // RTTI
  69. //
  70. virtual MenuDialogClass * As_MenuDialogClass (void) { return this; }
  71. //
  72. // Configuration methods
  73. //
  74. static MenuBackDropClass * Get_BackDrop (void) { return BackDrop; }
  75. static MenuBackDropClass * Replace_BackDrop (MenuBackDropClass *backdrop);
  76. //
  77. // Informational
  78. //
  79. bool Is_Active_Menu (void) const { return (ActiveMenu == this); }
  80. //
  81. // From DialogBaseClass
  82. //
  83. virtual void Start_Dialog (void);
  84. virtual void Render (void);
  85. virtual void End_Dialog (void);
  86. protected:
  87. ////////////////////////////////////////////////////////////////
  88. // Protected methods
  89. ////////////////////////////////////////////////////////////////
  90. //
  91. // From DialogBaseClass
  92. //
  93. virtual void On_Activate (bool onoff);
  94. //
  95. // New notifications
  96. //
  97. virtual void On_Menu_Activate (bool onoff);
  98. virtual void On_Last_Menu_Ending (void) {}
  99. ////////////////////////////////////////////////////////////////
  100. // Protected member data
  101. ////////////////////////////////////////////////////////////////
  102. static MenuDialogClass * ActiveMenu;
  103. static MenuBackDropClass * BackDrop;
  104. static DynamicVectorClass<MenuDialogClass *> MenuStack;
  105. };
  106. #endif //__MENU_DIALOG_H