//
// Tank_4.c
//

char	 Tank_4_gauge_name[]		= GAUGE_NAME;
extern	 PELEMENT_HEADER			Tank_4_list;
extern	 MOUSERECT					Tank_4_mouse_rect[];

GAUGE_HEADER_FS700(GAUGE_W, Tank_4_gauge_name, &Tank_4_list, \
						Tank_4_mouse_rect, 0, 0, 0, 0);

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

/////////////////////////////////////////////////////////////////////////////
FLOAT64 FSAPI	Tank_4_string_cb( PELEMENT_STRING pelement )
{
	lookup_var( &FUEL_TANK_CENTER2_LEVEL_var );
	Tank_4 = (FUEL_TANK_CENTER2_LEVEL_var.var_value.n  / 8388608 ) * 8800;
	sprintf(pelement->string ,"%04d",Tank_4);

	return Tank_4;
}

MAKE_STRING
(
	Tank_4_string,
	NULL,
	Tank_4_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_4_string_cb
)

PELEMENT_HEADER		Tank_4_icon_list[] =
{
	&Tank_4_string.header,
	NULL
};


/////////////////////////////////////////////////////////////////////////////
MAKE_STATIC
(
	Tank_4_background,
	BMP_String_bg,
	&Tank_4_icon_list,
	NULL,
	IMAGE_USE_TRANSPARENCY,
	0,
	0,0
)

PELEMENT_HEADER		Tank_4_list	= &Tank_4_background.header;


MOUSE_BEGIN( Tank_4_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


