/// <summary>
    /// Draws an interface to interact with a number list.
    /// </summary>
    /// <param name='dataMap'>
    /// Data map.
    /// </param>
    public void DrawGUI(AGSGameDataMap dataMap)
    {
        // make sure necessary variables are available before drawing anything.
        if (null == dataMap)
        {
            AmazonGUIHelpers.CenteredLabel(notInitializedLabel);
            return;
        }

        // make sure the number list is initialized before using it.
        if (null == syncableNumberList)
        {
            InitSyncableNumberList(dataMap);
        }

        if (null == syncableNumberList)
        {
            AmazonGUIHelpers.CenteredLabel(notInitializedLabel);
            return;
        }
        // putting a box around the list helps visually separate the lists in the menu.
        GUILayout.BeginVertical(GUI.skin.box);

        // foldouts help keep menus clean.
        foldout = AmazonGUIHelpers.FoldoutWithLabel(foldout, ListName());

        if (foldout)
        {
            // this button refreshes the list, and retrieves elements in it.
            if (GUILayout.Button(refreshSyncableNumberElementsButtonLabel))
            {
                RefreshList();
            }

            // This label displays if this list has been set.
            AmazonGUIHelpers.CenteredLabel(string.Format(isListSetLabel, isSet));

            // This label displays the max size (if the size has been retrieved).
            if (maxSize.HasValue)
            {
                maxSize = (int)AmazonGUIHelpers.DisplayCenteredSlider((float)maxSize.Value, minMaxSize, maxMaxSize, maxSizeLabel);
                if (GUILayout.Button(updateMaxSizeButtonLabel))
                {
                    syncableNumberList.SetMaxSize(maxSize.Value);
                }
            }

            // if the list is empty, display a message
            if (null == syncableNumberElementsCache || 0 == syncableNumberElementsCache.Length)
            {
                AmazonGUIHelpers.CenteredLabel(emptyListLabel);
            }
            // display each element in the list.
            else
            {
                foreach (AmazonGameCircleExampleWSNumberListElementCache cachedElement in syncableNumberElementsCache)
                {
                    cachedElement.DrawElement();
                }
            }

            // this button adds some values to the list, increments those values, and refreshes the list.
            // automatically incrementing values every time they are added allows this menu
            // to remain simple, without value selection logic.
            if (GUILayout.Button(addValuesButtonLabel))
            {
                AddValuesToList();
                // increment between adding values to make sure the metadata entries are different.
                IncrementValues();
                AddValuesToListWithMetadata();
                IncrementValues();
                RefreshList();
            }
        }
        GUILayout.EndVertical();
    }