fancy new command palette

This commit is contained in:
Frank Skare
2021-06-22 20:54:14 +02:00
parent bac8b2b96c
commit 55f16d2c53
19 changed files with 69 additions and 305 deletions

View File

@@ -242,7 +242,14 @@ namespace mpvnet
public static IEnumerable<CommandPaletteItem> GetItems()
{
return CommandItem.Items.Select(i => new CommandPaletteItem() { Text = i.Display, SecondaryText = i.Input });
var aaa = CommandItem.Items.ToArray();
return CommandItem.Items
.Where(i => i.Command != "")
.Select(i => new CommandPaletteItem() {
Text = i.Display,
SecondaryText = i.Input,
Action = () => Core.command(i.Command)
});
}
}
}