@ulrik Thanks a lot man, I really appreciate it! Super helpful, it works now
Latest posts made by drey
-
RE: Presets displayed in a combobox issues
-
Presets displayed in a combobox issues
Hi everyone. I'm newbie here.
I got a combobox displaying the presets in presets folder, its working fine, but there are two problems:
1 - The whole directory name + preset name is shown in the combobox instead of just the preset name.
2 - When I save a new preset, It will only be shown in the combobox if I hit 'Compile' again.
Does anyone have a clue of how can I fix this behavior?
Code I have for this Combobox so far:
const var Presets = Content.getComponent("Presets");
var menuItems = [];const var x = Engine.getUserPresetList();
for (i in x)
menuItems.insert(-1, i);menuItems = menuItems.join("\n");
Presets.set("items", menuItems);inline function onPresetsControl(component, value)
{
Engine.loadUserPreset(Presets.getItemText() + ".preset");
};Content.getComponent("Presets").setControlCallback(onPresetsControl);