add:   if (coordGroup == GUIType) {  resourceObject.size = Crd[getCrd(resourceObject.name, true)].size[GUIType]; } 
context: function refreshResource (resourceName){	// Ignore the "Housing" resource ... It doesn't work like normal resources and doesn't have a counter to resize.	if (resourceName == "Housing")		resourceName = "Population";			// Update GUI resource counter caption.	if (resourceName != "Population")		getGUIObjectByName ("snResourceCounter_" + resourceName).caption = localPlayer.resource.valueOf()[resourceNameU];	else		getGUIObjectByName ("snResourceCounter_Population").caption = localPlayer.resource.valueOf()["POPULATION"] + "/" + localPlayer.resource.valueOf()["HOUSING"];			// Get the index of the resource readout to be resized.	crdResult = getCrd ("snResourceCounter_" + resourceName, true);	// Get resource readout object.	resourceObject = getGUIObjectByName ("snResourceCounter_" + resourceName);		// For each coordinate group stored for this control,	for (coordGroup in Crd[crdResult].coord)	{		// Set X position so that resources always are immediately next to each other. (Except for Food, which is always the leftmost resource.)		if (resourceName != "Food")			Crd[crdResult].coord[coordGroup].x				= Crd[crdResult-1].coord[coordGroup].x + Crd[crdResult-1].coord[coordGroup].width + 5;						// Set width of readout based on length of caption.		Crd[crdResult].coord[coordGroup].width = snConst.MiniIcon.Width+5 + resourceObject.caption.length * 10;				// Recalculate readout's size coordinates.		Crd[crdResult].size[coordGroup] = calcCrdArray (Crd[crdResult].coord[coordGroup].rx, Crd[crdResult].coord[coordGroup].ry, Crd[crdResult].coord[coordGroup].x, Crd[crdResult].coord[coordGroup].y, Crd[crdResult].coord[coordGroup].width, Crd[crdResult].coord[coordGroup].height, Crd[crdResult].coord[coordGroup].rx2, Crd[crdResult].coord[coordGroup].ry2);	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/9d8b6cd779c6255c8eb3500bc2fc26ed3b61a4a6/functions_sim_player.js/buggy/binaries/data/mods/official/gui/test/functions_sim_player.js