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; }
private void OnAfterTemplateRenamed(ReorderableListBox sender, ItemLabelEditEventArgs args) { ShapeTemplate shapeTemplate = (ShapeTemplate)args.Item.Tag; args.CancelEdit = !RenameShapeTemplate(shapeTemplate, args.Label); }
private void OnSelectedTemplateChanged(ReorderableListBox sender, int prevSelectedIndex) { UpdateTemplateInfo(); }