//
// Tank_3.c
//
char	 Tank_3_gauge_name[]		= GAUGE_NAME;
extern	 PELEMENT_HEADER			Tank_3_list;
extern	 MOUSERECT					Tank_3_mouse_rect[];

GAUGE_HEADER_FS700(GAUGE_W, Tank_3_gauge_name, &Tank_3_list, \
						Tank_3_mouse_rect, 0, 0, 0, 0);

/////////////////////////////////////////////////////////////////////////////
FAILURE_RECORD	Tank_3_fail[] =
{
	{FAIL_SYSTEM_ELECTRICAL_PANELS, FAIL_ACTION_NO_DRAW},
	{FAIL_NONE, FAIL_ACTION_NONE}
};

/////////////////////////////////////////////////////////////////////////////
FLOAT64 FSAPI	Tank_3_string_cb( PELEMENT_STRING pelement )
{
	lookup_var( &FUEL_TANK_CENTER_LEVEL_var );
	Tank_3 = (FUEL_TANK_CENTER_LEVEL_var.var_value.n  / 8388608 ) * 2600;
	sprintf(pelement->string ,"%04d",Tank_3);

	return Tank_3;
}

MAKE_STRING
(
	Tank_3_string,
	NULL,
	Tank_3_fail,
	IMAGE_USE_ERASE | IMAGE_USE_BRIGHT | IMAGE_USE_BRIGHT | IMAGE_USE_TRANSPARENCY,
	0,
	6, 1,
	90, 57,
	4,

	MODULE_VAR_NONE,  
	MODULE_VAR_NONE,
	MODULE_VAR_NONE,
	RGB(0,161,0),
	RGB(0,0,0),
	RGB(92,92,92),
	GAUGE_FONT_DEFAULT,
	GAUGE_WEIGHT_DEFAULT,
	GAUGE_CHARSET,
	0,
	DT_CENTER | DT_VCENTER | DT_SINGLELINE,
	NULL,
	Tank_3_string_cb
)

PELEMENT_HEADER		Tank_3_icon_list[] =
{
	&Tank_3_string.header,
	NULL
};


/////////////////////////////////////////////////////////////////////////////
MAKE_STATIC
(
	Tank_3_background,
	BMP_String_bg,
	&Tank_3_icon_list,
	NULL,
	IMAGE_USE_TRANSPARENCY,
	0,
	0,0
)

PELEMENT_HEADER		Tank_3_list	= &Tank_3_background.header;


MOUSE_BEGIN( Tank_3_mouse_rect, HELP_NONE, 0, 0 )
MOUSE_END


/////////////////////////////////////////////////////////////////////////////
#undef GAUGE_NAME
#undef GAUGEHDR_VAR_NAME
#undef GAUGE_W
#undef GAUGE_CHARSET
#undef GAUGE_FONT_DEFAULT
#undef GAUGE_WEIGHT_DEFAULT


