CnC_Remastered_Collection

Command and Conquer: Red Alert
Log | Files | Refs | README | LICENSE

BIGCHECK.CPP (2315B)


      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 
      9 // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed 
     10 // in the hope that it will be useful, but with permitted additional restrictions 
     11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 
     12 // distributed with this program. You should have received a copy of the 
     13 // GNU General Public License along with permitted additional restrictions 
     14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
     15 
     16 //	BigCheck.cpp
     17 //	ajw 9/14/98
     18 
     19 #ifdef WOLAPI_INTEGRATION
     20 
     21 #include	"function.h"
     22 #include	"bigcheck.h"
     23 
     24 //***********************************************************************************************
     25 int BigCheckBoxClass::Draw_Me( int forced )
     26 {
     27 	if (ToggleClass::Draw_Me(forced))
     28 	{
     29 		Hide_Mouse();
     30 
     31 		if( !IsOn )
     32 		{
     33 			if( !IsDisabled )
     34 				CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 0, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
     35 			else
     36 				CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 2, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
     37 		}
     38 		else
     39 		{
     40 			if( !IsDisabled )
     41 				CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 1, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
     42 			else
     43 				CC_Draw_Shape( MFCD::Retrieve( "bigcheck.shp" ), 3, X, Y, WINDOW_MAIN, SHAPE_NORMAL );
     44 		}
     45 
     46 		TextPrintType flags = TextFlags;
     47 		
     48 		RemapControlType* pScheme;
     49 		
     50 //		if( !IsDisabled )
     51 			pScheme = GadgetClass::Get_Color_Scheme();
     52 //		else
     53 //		{
     54 //			pScheme = &GreyScheme;
     55 //			flags = flags | TPF_MEDIUM_COLOR;
     56 //		}
     57 
     58 		Conquer_Clip_Text_Print( szCaption, X + BIGCHECK_OFFSETX, Y + BIGCHECK_OFFSETY, pScheme, TBLACK, flags, Width, 0 );
     59 
     60 		Show_Mouse();
     61 		return true;
     62 	}
     63 	return false;
     64 }
     65 
     66 //***********************************************************************************************
     67 int BigCheckBoxClass::Action(unsigned flags, KeyNumType & key)
     68 {
     69 /*	if( flags & LEFTPRESS )
     70 	{
     71 		if (IsOn) {
     72 			Turn_Off();
     73 		} else {
     74 			Turn_On();
     75 		}
     76 	}
     77 */
     78 	return(ToggleClass::Action(flags, key));
     79 }
     80 
     81 #endif