Preset List Order
-
Is it possible to customized the order that presets are displayed, within the floating tile preset browser? I know this is fairly easy to do with a customized preset browser but I am using the built in browser in this case. By default the list displays alphabetically, but I want my "Default" setting to be the first one displayed.
-
@HISEnberg I use the
-
prefix to ensure that the default preset is listed at the top. -
@orange Thanks that is a useful trick. I am also trying to organize my list non-alphabetically so this only gets me part of the way there. :)
-
@HISEnberg said in Preset List Order:
Thanks that is a useful trick. I am also trying to organize my list non-alphabetically so this only gets me part of the way there. :)
It gets you all of the way - you don't have to show the actual name of the file in the preset browser ;)
-
@d-healey Ohhhhh clever I think I understand. How do you change the displayed name of the preset? I think you mean if I name my Presets like so:
1-Default
2-Preset4
3-Preset1etc.
And remove the "i-" from the name I can reorder them?
-
@HISEnberg said in Preset List Order:
And remove the "i-" from the name I can reorder them?
Exactly, you can do this using LAF
-
@d-healey Would you recommend the .replace function? I can't figure out a simpler method of doing this
inline function cleanPresetName(displayName) { return displayName .replace("1-", "") .replace("2-", "") .replace("3-", "") .replace("4-", "") .replace("5-", "") .replace("6-", ""); }
-
@HISEnberg Replace is good, if you combine it with substring then you don't need to write it out for each number.
const presets = ["1-Default", "2-Preset4", "3-Preset1"]; inline function cleanPresetName(name) { return name.replace(name.substring(0, name.indexOf("-") + 1)); } Console.print(cleanPresetName(presets[1]));
-
@d-healey Great thank you so much. I think I need a refresher on the String API.