rem: unitArray 	= UpdateList("tab_train", listCounter); 	if (unitArray != "0")		 listCounter++; structcivArray 	= UpdateList("tab_buildciv", listCounter);	if (structcivArray != "0")	 listCounter++; structmilArray 	= UpdateList("tab_buildmil", listCounter);	if (structmilArray != "0")	 listCounter++; techArray 	= UpdateList("tab_research", listCounter);	if (techArray != "0")		 listCounter++; formationArray 	= UpdateList("tab_formation", listCounter);	if (formationArray != "0")	 listCounter++; behaviourArray 	= UpdateList("tab_behaviour", listCounter);	if (behaviourArray != "0")	 listCounter++; 
add: unitArray 	= UpdateList("tab_train", listCounter); 	if (unitArray != 0)		 listCounter++; structcivArray 	= UpdateList("tab_buildciv", listCounter);	if (structcivArray != 0)	 listCounter++; structmilArray 	= UpdateList("tab_buildmil", listCounter);	if (structmilArray != 0)	 listCounter++; techArray 	= UpdateList("tab_research", listCounter);	if (techArray != 0)		 listCounter++; formationArray 	= UpdateList("tab_formation", listCounter);	if (formationArray != 0)	 listCounter++; behaviourArray 	= UpdateList("tab_behaviour", listCounter);	if (behaviourArray != 0)	 listCounter++; 
context: function UpdateCommandButtons(){	// Update train/research/build lists.	listCounter	= 1; 	unitArray 	= UpdateList("tab_train", listCounter); 	if (unitArray != "0")		 listCounter++;	structcivArray 	= UpdateList("tab_buildciv", listCounter);	if (structcivArray != "0")	 listCounter++;	structmilArray 	= UpdateList("tab_buildmil", listCounter);	if (structmilArray != "0")	 listCounter++;	techArray 	= UpdateList("tab_research", listCounter);	if (techArray != "0")		 listCounter++;	formationArray 	= UpdateList("tab_formation", listCounter);	if (formationArray != "0")	 listCounter++;	behaviourArray 	= UpdateList("tab_behaviour", listCounter);	if (behaviourArray != "0")	 listCounter++;	// Update commands.	commandCounter = command_max;	commandCounter = UpdateCommand("action_attack", commandCounter);	commandCounter = UpdateCommand("action_patrol", commandCounter);	commandCounter = UpdateCommand("action_repair", commandCounter);	commandCounter = UpdateCommand("action_gather_food", commandCounter);	commandCounter = UpdateCommand("action_gather_wood", commandCounter);	commandCounter = UpdateCommand("action_gather_stone", commandCounter);	commandCounter = UpdateCommand("action_gather_ore", commandCounter);	// Clear remaining buttons between them.	for (commandClearLoop = listCounter; commandClearLoop <= commandCounter; commandClearLoop++)	{		GUIObjectHide("session_panel_status_command_pri_" + commandClearLoop);		// If this slot could possibly contain a list, hide that too.		if (commandClearLoop <= command_list_max)			GUIObjectHide("session_panel_status_command_pri_" + commandClearLoop + "_group");	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/8ce263a002c670727dff679af908b700e9225b80/functions_session_status_orb.js/clean/binaries/data/mods/official/gui/test/functions_session_status_orb.js