ExtendedMessageBox.h 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. ////////////////////////////////////////////////////////////////////////////////
  19. // //
  20. // (c) 2001-2003 Electronic Arts Inc. //
  21. // //
  22. ////////////////////////////////////////////////////////////////////////////////
  23. // FILE: ExtendedMessageBox.h /////////////////////////////////////////////////////////////////////
  24. // Author: Matt Campbell, January 2003
  25. // Description: We go quiet in 1 day, gold in 15. Poor time to rewrite message boxes, so
  26. // we get this file instead. Phooey.
  27. ///////////////////////////////////////////////////////////////////////////////////////////////////
  28. #pragma once
  29. #ifndef __EXTENDEDMESSAGEBOX_H_
  30. #define __EXTENDEDMESSAGEBOX_H_
  31. #include "GameClient/GameWindowManager.h"
  32. // return codes for message box callbacks
  33. enum MessageBoxReturnType {
  34. MB_RETURN_CLOSE,
  35. MB_RETURN_KEEPOPEN
  36. };
  37. typedef MessageBoxReturnType (* MessageBoxFunc)( void *userData );
  38. // WindowExMessageBoxData ---------------------------------------------------------
  39. /** Data attached to each extended Message box window */
  40. //-----------------------------------------------------------------------------
  41. struct WindowExMessageBoxData
  42. {
  43. MessageBoxFunc yesCallback; ///<Function pointer to the Yes Button Callback
  44. MessageBoxFunc noCallback; ///<Function pointer to the No Button Callback
  45. MessageBoxFunc okCallback; ///<Function pointer to the Ok Button Callback
  46. MessageBoxFunc cancelCallback; ///<Function pointer to the Cancel Button Callback
  47. void *userData;
  48. };
  49. GameWindow *ExMessageBoxYesNo (UnicodeString titleString,UnicodeString bodyString, void *userData,
  50. MessageBoxFunc yesCallback, MessageBoxFunc noCallback);
  51. GameWindow *ExMessageBoxYesNoCancel (UnicodeString titleString,UnicodeString bodyString, void *userData,
  52. MessageBoxFunc yesCallback, MessageBoxFunc noCallback, MessageBoxFunc cancelCallback);
  53. GameWindow *ExMessageBoxOkCancel (UnicodeString titleString,UnicodeString bodyString, void *userData,
  54. MessageBoxFunc okCallback, MessageBoxFunc cancelCallback);
  55. GameWindow *ExMessageBoxOk (UnicodeString titleString,UnicodeString bodyString, void *userData,
  56. MessageBoxFunc okCallback);
  57. GameWindow *ExMessageBoxCancel (UnicodeString titleString,UnicodeString bodyString, void *userData,
  58. MessageBoxFunc cancelCallback);
  59. #endif //__EXTENDEDMESSAGEBOX_H_