예제 #1
0
        public void RebuildCutsceneMenu()
        {
            CutsceneMenus.Clear();
            _children.Clear();

            {
                var menu = new CreateCutsceneMenu(this);
                var item = new NativeMenuItem("Create Cutscene");
                CutsceneMenus.AddItem(item);
                CutsceneMenus.BindMenuToItem(menu, item);
                _children.Add(menu);
            }

            foreach (var cutscene in Editor.Editor.CurrentMission.Cutscenes)
            {
                var item = new NativeMenuItem(cutscene.Name);
                CutsceneMenus.AddItem(item);
                item.Activated += (sender, selectedItem) =>
                {
                    CutsceneMenus.Visible = false;
                    EditCutsceneMenu.Build(cutscene);
                    EditCutsceneMenu.Visible = true;
                };
            }

            CutsceneMenus.RefreshIndex();
        }
예제 #2
0
        public void RebuildCutsceneMenu()
        {
            CutsceneMenus.Clear();
            _children.Clear();

            {
                var menu = new CreateCutsceneMenu(this);
                var item = new NativeMenuItem("Create Cutscene");
                CutsceneMenus.AddItem(item);
                CutsceneMenus.BindMenuToItem(menu, item);
                _children.Add(menu);
            }

            foreach (var cutscene in Editor.Editor.CurrentMission.Cutscenes)
            {
                var item = new NativeMenuItem(cutscene.Name);
                CutsceneMenus.AddItem(item);
                item.Activated += (sender, selectedItem) =>
                {
                    CutsceneMenus.Visible = false;
                    EditCutsceneMenu.Build(cutscene);
                    EditCutsceneMenu.Visible = true;
                };
            }

            CutsceneMenus.RefreshIndex();
        }