BIGCHECK.CPP 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. /*
  2. ** Command & Conquer Red Alert(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. // BigCheck.cpp
  19. // ajw 9/14/98
  20. #ifdef WOLAPI_INTEGRATION
  21. #include "function.h"
  22. #include "bigcheck.h"
  23. //***********************************************************************************************
  24. int BigCheckBoxClass::Draw_Me( int forced )
  25. {
  26. if (ToggleClass::Draw_Me(forced))
  27. {
  28. Hide_Mouse();
  29. if( !IsOn )
  30. {
  31. if( !IsDisabled )
  32. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 0, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  33. else
  34. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 2, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  35. }
  36. else
  37. {
  38. if( !IsDisabled )
  39. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 1, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  40. else
  41. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 3, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  42. }
  43. TextPrintType flags = TextFlags;
  44. RemapControlType* pScheme;
  45. // if( !IsDisabled )
  46. pScheme = GadgetClass::Get_Color_Scheme();
  47. // else
  48. // {
  49. // pScheme = &GreyScheme;
  50. // flags = flags | TPF_MEDIUM_COLOR;
  51. // }
  52. Conquer_Clip_Text_Print( szCaption, X + BIGCHECK_OFFSETX, Y + BIGCHECK_OFFSETY, pScheme, TBLACK, flags, Width, 0 );
  53. Show_Mouse();
  54. return true;
  55. }
  56. return false;
  57. }
  58. //***********************************************************************************************
  59. int BigCheckBoxClass::Action(unsigned flags, KeyNumType & key)
  60. {
  61. /* if( flags & LEFTPRESS )
  62. {
  63. if (IsOn) {
  64. Turn_Off();
  65. } else {
  66. Turn_On();
  67. }
  68. }
  69. */
  70. return(ToggleClass::Action(flags, key));
  71. }
  72. #endif