예제 #1
0
        private void Init()
        {
            context              = new DropdownContext();
            context.OnSelection += OnSelectionChange;
            context.Datas.Add(new DropdownData("Selection A", "Extra A"));
            context.Datas.Add(new DropdownData("Selection B", "Extra B"));
            context.Datas.Add(new DropdownData("Selection C", "Extra C"));
            context.Datas.Add(new DropdownData("Selection D", "Extra D"));
            context.Datas.Add(new DropdownData("Selection E", "Extra E"));
            context.Datas.Add(new DropdownData("Selection F", "Extra F"));
            context.Datas.Add(new DropdownData("Selection G", "Extra G"));
            context.Datas.Add(new DropdownData("Selection H", "Extra H"));
            context.Datas.Add(new DropdownData("Selection I", "Extra I"));
            context.Datas.Add(new DropdownData("Selection J", "Extra J"));

            var container = RootMain.CreateChild <UguiSprite>("bg");
            {
                container.Size  = new Vector2(500f, 500f);
                container.Alpha = 0.25f;

                menu = container.CreateChild <DropdownMenu>("dropdown");
                menu.CloseMenu();
            }
        }
예제 #2
0
 private IEnumerator CloseMenu()
 {
     menu.CloseMenu();
     yield break;
 }