[WIP] MilkDrop preset editor
OK, this is the work in progress MilkDrop preset editor. Wanted to get an initial version up so we could start talking over design, etc.
Major caveat: The editor currently only works with MilkDrop files that it has converted in the browser (i.e. you need to drag in a new preset that doesn't exist in the list of presets and edit that new preset). We can fix this later, should really change anything about how the editor is built.
Design: The editor is a nested list of different types of editable variables (float, int, bool and text). We represent this as a tree with all the metadata needed (default value, min/max values, update key in preset, help text), and navigate through the tree when editing the preset. Each element has its information for defining the editor and updating its new value in the preset map (which is a bit different than the menu data structure).
Key handling is a bit hacky, but it seems to actually be working. I need to have slightly different key binding handling for when the editor is open vs not open, but I think its reasonable.
There is currently no feedback shown when editing shaders and it happens async. This can definitely be fixed for the final version.
Editing variable values should immediately update the preset. Many times nothing will change because the variables are just the static values that then get rewritting in preset equations (many times ignoring the static value).