context: function defineCommandButtons(command){	snStatusPaneCommand = new Array();	snStatusPaneCommand.tab = new Object();	snStatusPaneCommand.list = new Object();	snStatusPaneCommand.button = new Object();	// Maximum number of buttons (either single or lists).	snStatusPaneCommand.tab.max = command.substring (command.lastIndexOf ("d")+1, command.lastIndexOf ("_")); // 10	// Maximum number of entries in a list.	snStatusPaneCommand.list.max = command.substring (command.lastIndexOf ("_")+1, command.length); // 12	// Number of tabs that have to be single buttons (no list).	snStatusPaneCommand.button.max = 5;			// When we reach this button, split the rows (remainder are vertical, not horizontal).	snStatusPaneCommand.split = 7;				// Spacing between lists.	snStatusPaneCommand.span = 2;		// Get the coordinates of the Status Pane background (referenced to determine command button locations).	currCrd = getCrd ("snStatusPaneBkg");		// Update each tab.	for (var tabLoop = 1; tabLoop <= snStatusPaneCommand.tab.max; tabLoop++)	{		tempGroupObject = getGUIObjectByName("snStatusPaneCommand" +			"Group" + tabLoop);		// Update each list under each tab.		for (var listLoop = 1; listLoop <= snStatusPaneCommand.list.max; listLoop++)		{			tempListObject = getGUIObjectByName("snStatusPaneCommand" +				tabLoop + "_" + listLoop);			// Set portrait to default.			setPortrait (tempListObject.name, "IconPortrait");			// Determine x and y position for current button.			if (tabLoop >= snStatusPaneCommand.split)			{				if (listLoop == 1)				{					var x = currCrd.coord[rb].x+currCrd.coord[rb].width-14;						if (tabLoop == snStatusPaneCommand.split && listLoop == 1)						var y = currCrd.coord[rb].y; 					else						var y = Crd[Crd.last].coord[rb].y+Crd[Crd.last].coord[rb].height							+snStatusPaneCommand.span;				}				else				{					var x = Crd[Crd.last].coord[rb].x+Crd[Crd.last].coord[rb].width							+snStatusPaneCommand.span;					var y = Crd[Crd.last].coord[rb].y;				}			}			else			{				if (listLoop == 1)				{					if (tabLoop == 1 && listLoop == 1)						var x = currCrd.coord[rb].x; 					else						var x = Crd[Crd.last].coord[rb].x+Crd[Crd.last].coord[rb].width							+snStatusPaneCommand.span;					var y = currCrd.coord[rb].y+currCrd.coord[rb].height-7; 				}				else				{					var x = Crd[Crd.last].coord[rb].x;					var y = Crd[Crd.last].coord[rb].y+Crd[Crd.last].coord[rb].height						+snStatusPaneCommand.span;				}			}			// Define dimensions of list buttons.			addCrds ("snStatusPaneCommand" +	tabLoop + "_" + listLoop, 0, 100, x, y,				snConst.Portrait.Sml.Width, snConst.Portrait.Sml.Height);/*							// Store indexes to the button for easy future reference.			Crd[getCrd ("snStatusPaneCommand" +	tabLoop + "_" + listLoop, true)].tab = tabLoop;			Crd[getCrd ("snStatusPaneCommand" +	tabLoop + "_" + listLoop, true)].list = listLoop;			// Create quantity and entity for create lists for future use.			Crd[getCrd ("snStatusPaneCommand" +	tabLoop + "_" + listLoop, true)].entity = "";			Crd[getCrd ("snStatusPaneCommand" +	tabLoop + "_" + listLoop, true)].quantity = 0;			*/					}	}}
meta: 1070	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1070/848ead1d3e68b18fa7d2da9a12597af9209b66ea/functions_page_session_status_commands.js/buggy/binaries/data/mods/official/gui/test/functions_page_session_status_commands.js