using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class UIController : MonoBehaviour
{
public enum LargeStep
{
xx,
yy,
zz
}
public enum SmallStep
{
呼和浩特市,
赤峰市,
齐齐哈尔市,
长春市,
沈阳市,
}
public Dropdown LargeStepDropdown;
public Dropdown SmallStepDropdown;
void Start()
{
List<string> LargeStepOptions = new List<string>();
Type _LargeStep = typeof(LargeStep);
foreach (string s in Enum.GetNames(_LargeStep))
LargeStepOptions.Add(s);
LargeStepDropdown.AddOptions(LargeStepOptions);
LargeStepDropdown.onValueChanged.AddListener(LargeStepValueCange);
List<string> SmallStepOptions = new List<string>();
Type _SmallStep= typeof(SmallStep);
foreach (string s in Enum.GetNames(_SmallStep))
SmallStepOptions.Add(s);
SmallStepDropdown.AddOptions(SmallStepOptions);
SmallStepDropdown.onValueChanged.AddListener(SmallStepValueCange);
}
void LargeStepValueCange(int _value) {
Debug.Log(_value);
}
void SmallStepValueCange(int _value)
{
Debug.Log(_value);
}
}