/////////////////////////////////////////////////////////////////////////////
// EN1_fueloff_ind.c
// 
/////////////////////////////////////////////////////////////////////////////

//	Set up gauge header
char EN1_fueloff_ind_gauge_name[]	= GAUGE_NAME;
extern PELEMENT_HEADER	EN1_fueloff_ind_list;
extern MOUSERECT      	EN1_fueloff_ind_mouse_rect[];

GAUGE_HEADER_FS700(GAUGE_W, EN1_fueloff_ind_gauge_name, &EN1_fueloff_ind_list, \
						0, 0, 0, 0, 0);

/*---------------------------------------------------------------------------
---- Functions that ilustrate status of Keys --------------------------------
---------------------------------------------------------------------------*/
FLOAT64 FSAPI	EN1_fueloff_ind_icon_cb( PELEMENT_ICON pelement )
{
	lookup_var( &FUEL_TANK_SELECTOR_var);

    switch (FUEL_TANK_SELECTOR_var.var_value.e)
    {
        case FUEL_TANK_SELECTOR_CENTER2:
            EN1_fueloff_ind = -1;           
            break;

        case FUEL_TANK_SELECTOR_LEFT_TIP:
            EN1_fueloff_ind = -1;           
            break;

        case FUEL_TANK_SELECTOR_LEFT_AUX:    
            EN1_fueloff_ind = -1;            
            break;

        case FUEL_TANK_SELECTOR_OFF:    
            EN1_fueloff_ind = 0;         
            break;

        default: 
            break;
    } 

	return EN1_fueloff_ind;
}

/*---------------------------------------------------------------------------
------------ Make ICONS macroses     ----------------------------------------
---------------------------------------------------------------------------*/
MAKE_ICON
(		
	EN1_fueloff_ind_icon,
	BMP_EN1_fueloff_ind_on,
	NULL,
	NULL,
	IMAGE_USE_ERASE  | IMAGE_USE_TRANSPARENCY,
	0,
	0,0,

	MODULE_VAR_NONE, EN1_fueloff_ind_icon_cb,

	ICON_SWITCH_TYPE_SET_CUR_ICON,
	1,
	0,
	0
)

PELEMENT_HEADER		EN1_fueloff_ind_icon_list[] =
{
	&EN1_fueloff_ind_icon.header,
	NULL
};
/////////////////////////////////////////////////////////////////////////////
MAKE_STATIC
(
	EN1_fueloff_ind_background,
	BMP_EN1_fueloff_ind_off,
	&EN1_fueloff_ind_icon_list,
	NULL,
	IMAGE_USE_TRANSPARENCY,
	0,
	0,0
)

PELEMENT_HEADER		EN1_fueloff_ind_list= &EN1_fueloff_ind_background.header;

#undef GAUGE_NAME
#undef GAUGEHDR_VAR_NAME
#undef GAUGE_W
