예제 #1
0
    public KGFGUIDropDown(IEnumerable <string> theEntrys, uint theWidth, uint theMaxVisibleItems, eDropDirection theDirection, params GUILayoutOption[] theLayout)
    {
        if (theEntrys != null)
        {
            foreach (string aEntry in theEntrys)
            {
                itsEntrys.Add(aEntry);
            }

            itsWidth           = theWidth;
            itsMaxVisibleItems = theMaxVisibleItems;
            itsDirection       = theDirection;

            if (itsEntrys.Count > 0)
            {
                itsCurrentSelected = itsEntrys[0];
            }
        }
        else
        {
            UnityEngine.Debug.LogError("the list of entrys was null");
        }
    }
예제 #2
0
	public KGFGUIDropDown(IEnumerable<string> theEntrys, uint theWidth, uint theMaxVisibleItems, eDropDirection theDirection, params GUILayoutOption[] theLayout)
	{
		if(theEntrys != null)
		{
			foreach(string aEntry in theEntrys)
			{
				itsEntrys.Add(aEntry);
			}
			
			itsWidth = theWidth;
			itsMaxVisibleItems = theMaxVisibleItems;
			itsDirection = theDirection;
			
			if(itsEntrys.Count > 0)
			{
				itsCurrentSelected = itsEntrys[0];
			}
		}
		else
		{
			UnityEngine.Debug.LogError("the list of entrys was null");
		}
	}