Server.Gumps.RunebookGump.AddDetails C# (CSharp) Méthode

AddDetails() private méthode

private AddDetails ( int index, int half ) : void
index int
half int
Résultat void
		private void AddDetails( int index, int half )
		{
			// Use charge button
			AddButton( 130 + (half * 160), 65, 2103, 2104, 2 + (index * 6) + 0, GumpButtonType.Reply, 0 );

			string desc;
			int hue;

			if ( index < m_Book.Entries.Count )
			{
				RunebookEntry e = (RunebookEntry)m_Book.Entries[index];

				desc = GetName( e.Description );
				hue = GetMapHue( e.Map );

				// Location labels
				int xLong = 0, yLat = 0;
				int xMins = 0, yMins = 0;
				bool xEast = false, ySouth = false;

				if ( Sextant.Format( e.Location, e.Map, ref xLong, ref yLat, ref xMins, ref yMins, ref xEast, ref ySouth ) )
				{
					AddLabel( 135 + (half * 160), 80, 0, String.Format( "{0}° {1}'{2}", yLat, yMins, ySouth ? "S" : "N" ) );
					AddLabel( 135 + (half * 160), 95, 0, String.Format( "{0}° {1}'{2}", xLong, xMins, xEast ? "E" : "W" ) );
				}

				// Drop rune button
				AddButton( 135 + (half * 160), 115, 2437, 2438, 2 + (index * 6) + 1, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 150 + (half * 160), 115, 100, 18, 1011298, false, false ); // Drop rune

				// Set as default button
				int defButtonID = e != m_Book.Default ? 2361 : 2360;
				
				AddButton( 160 + (half * 140), 20, defButtonID, defButtonID, 2 + (index * 6) + 2, GumpButtonType.Reply, 0 );
				AddHtmlLocalized( 175 + (half * 140), 15, 100, 18, 1011300, false, false ); // Set default

				// Recall button
				AddButton( 135 + (half * 160), 140, 2271, 2271, 2 + (index * 6) + 3, GumpButtonType.Reply, 0 );

				// Gate button
				AddButton( 205 + (half * 160), 140, 2291, 2291, 2 + (index * 6) + 4, GumpButtonType.Reply, 0 );
			}
			else
			{
				desc = "Empty";
				hue = 0;
			}

			// Description label
			AddLabelCropped( 145 + (half * 160), 60, 115, 17, hue, desc );
		}