BIGCHECK.CPP 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. // BigCheck.cpp
  15. // ajw 9/14/98
  16. #ifdef WOLAPI_INTEGRATION
  17. #include "function.h"
  18. #include "bigcheck.h"
  19. //***********************************************************************************************
  20. int BigCheckBoxClass::Draw_Me( int forced )
  21. {
  22. if (ToggleClass::Draw_Me(forced))
  23. {
  24. Hide_Mouse();
  25. if( !IsOn )
  26. {
  27. if( !IsDisabled )
  28. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 0, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  29. else
  30. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 2, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  31. }
  32. else
  33. {
  34. if( !IsDisabled )
  35. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 1, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  36. else
  37. CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 3, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
  38. }
  39. TextPrintType flags = TextFlags;
  40. RemapControlType* pScheme;
  41. // if( !IsDisabled )
  42. pScheme = GadgetClass::Get_Color_Scheme();
  43. // else
  44. // {
  45. // pScheme = &GreyScheme;
  46. // flags = flags | TPF_MEDIUM_COLOR;
  47. // }
  48. Conquer_Clip_Text_Print( szCaption, X + BIGCHECK_OFFSETX, Y + BIGCHECK_OFFSETY, pScheme, TBLACK, flags, Width, 0 );
  49. Show_Mouse();
  50. return true;
  51. }
  52. return false;
  53. }
  54. //***********************************************************************************************
  55. int BigCheckBoxClass::Action(unsigned flags, KeyNumType & key)
  56. {
  57. /* if( flags & LEFTPRESS )
  58. {
  59. if (IsOn) {
  60. Turn_Off();
  61. } else {
  62. Turn_On();
  63. }
  64. }
  65. */
  66. return(ToggleClass::Action(flags, key));
  67. }
  68. #endif