Exemplo n.º 1
0
        public LevelSetsPage(IEditor <CampaignFile> editor)
        {
            this.editor = editor;

            tabs = new ExtendedTabControl();

            tabs.AddPage("Properties", properties = new LevelSetsPropertiesView(this.editor), scrollable: true);
            tabs.AddPage("Levels", levels         = new LevelSetsPlaylistView(editor), scrollable: false);

            TableRow row = new TableRow()
            {
                Cells =
                {
                    new TableCell(listBox = new ReorderableListBox()),
                    new TableCell(tabs),
                }
            };

            Rows.Add(row);

            listBox.SelectedKeyChanged += SelectPlaylist;
            listBox.ItemsReordered     += (_, __) => this.editor.Modified = true;

            listBox.RemoveItem += RemovePlaylist;
            listBox.AddItem    += AddPlaylist;

            properties.OnModified += PropertiesModified;

            levels.OnModified += PlaylistLevelsModified;
        }
Exemplo n.º 2
0
 private void OnAfterTemplateRenamed(ReorderableListBox sender, ItemLabelEditEventArgs args)
 {
   ShapeTemplate shapeTemplate = (ShapeTemplate)args.Item.Tag;
   args.CancelEdit = !RenameShapeTemplate(shapeTemplate, args.Label);
 }
Exemplo n.º 3
0
 private void OnSelectedTemplateChanged(ReorderableListBox sender, int prevSelectedIndex)
 {
   UpdateTemplateInfo();
 }