Hello,
I'm having an issue with fb.IsMainMenuCommandChecked()
The code below allow me to successfuly change the settings - all the defined settings - but it fail to retrieve the state of the "Playback/order/..." stuff. II can't understand why. Foobar's bug or SMP's bug ?
Or me ?
let menu = window.CreatePopupMenu();
let ent = ['Order/Default','Order/Repeat (playlist)','Order/Repeat (track)','Order/Random','Stop after current','Playback follows cursor','Cursor follows playback'];
for (var i = 0; i < ent.length; i++) {
menu.AppendMenuItem(MF_STRING, i+1, ent[i].replace('Order/',''));
if (fb.IsMainMenuCommandChecked('Playback/' + ent[i])) {
menu.CheckMenuItem(i+1, true);
}
if (i == 3){
menu.AppendMenuSeparator();
}
}
const idx = menu.TrackPopupMenu(x, y);
if (idx>0) {
fb.RunMainMenuCommand('Playback/' + ent[idx-1]);
}