Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Toggle Buttons (Read 2165 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Toggle Buttons

Hello, I am new to fb2k and I am wondering how I could enable the play/pause button and the shuffle button to become toggle buttons so that I will not have to have both the "play" and the "pause" button up on the control panel. This way I can merge the two. Is there a plugin that would allow me to do this? I am not very good at programming and not to mention I have not done it in about 2 years.

Re: Toggle Buttons

Reply #1
Hello, I am new to fb2k and I am wondering how I could enable the play/pause button and the shuffle button to become toggle buttons so that I will not have to have both the "play" and the "pause" button up on the control panel.
AFAIK not straightforward (unless something has changed):
A. Buttons in  WSH Panel Mod, JScript Panel or Spider Monkey Panel. There is a "playback buttons" script for play/pause.
Edit: you use it by creating a panel and copying/pasting script text from component's folder in foobar's configuration folder. For example: C:\Users\abc\AppData\Roaming\foobar2000\user-components\foo_spider_monkey_panel\samples\complete\playback buttons.txt.

B. Panel stack splitter's (foo_uie_panel_splitter) buttons (for ColumnsUI). Just in case: it might be not a recommended component and although it works it's in alpha status.

Shuffle/regular (from PSS thread):
Code: [Select]
$if($stricmp($left(%ps_playback_order%,7),'default'),
$imagebutton(331,31,31,23,
%images%\nOrderDefault.png,
%images%\cOrderDefault.png,
COMMAND:'Playback/Order/Shuffle (tracks)';REFRESH),
$imagebutton(331,31,31,23,
%images%\nOrdershufftracks.png,
%images%\cOrdershufftracks.png,
COMMAND:'Playback/Order/Default';REFRESH))

play/pause
(I think i modified someone's code. Not sure about it but it works)
Code: [Select]
$if($and($not(%ps_isplaying%),$not(%ps_ispause%)),
$imagebutton(202,31,31,23,
%images%\nPlayPause.png,
%images%\cPlayPause.png,
COMMAND:Playback/Play or Pause;REFRESH),
$imagebutton(202,31,31,23,
%images%\$if(%ps_ispause%,npause.png,nplay.png),
%images%\$if(%ps_ispause%,cpause.png,cplay.png),
COMMAND:Playback/Play or Pause;REFRESH))
%images% is a path to an image folder

Re: Toggle Buttons

Reply #2
If you right click on the existing buttons and select "Customise Buttons" there's a button under Main/Playback labelled "Play or Pause". You'll have to find your own icon for it but I think that's what you're after. There's also a Random button if that's what you mean by "shuffle".

There's a button thread here. You need standard icon files for the default UI. https://hydrogenaud.io/index.php/topic,35270.0.html