Skip to main content
Topic: Anyway to add a button or visual indicator for "stop after current" on foobar200 (Read 543 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Anyway to add a button or visual indicator for "stop after current" on foobar200

I use "stop after current" very often and I have a global hotkey for it, but I cannot easily tell if it is activated or not, especially if I fat finger the hotkey and am not sure if I enabled it or not. Is there any way to add a clickable enable/disable or check mark/blank button on foobar so that I can see from a quick glance whether 'stop after current' is enabled? If so how?

Appreciate it!

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #1
Within the Panel Stack Splitter I created a button which changes color using $imagebutton and a global variable:
Code: [Select]
// Stop after current

$init_ps_global(this_stop_after_current,0,1)

$if($stricmp(%this_stop_after_current%,'1'),

   // stop after current active

   $puts(this_filename_of_pic,Stop_tiefrot.png)
   $puts(x_promille,935)
   $puts(y_promille,310)
   $puts(this_width,50)
   $puts(this_original_width,1)
   $puts(this_original_height,1)

   $puts(this_position_X,$div($mul($get(x_promille),%_width%),1000))
   $puts(this_position_Y,$div($mul($get(y_promille),%_height%),1000))

   $imagebutton($get(this_position_X),$get(this_position_Y),$get(this_width),$muldiv($get(this_width),$get(this_original_height),$get(this_original_width)),.\my_pics\$get(this_filename_of_pic),.\my_pics\$get(this_filename_of_pic),
                        COMMAND:Playback/Stop after current;
                        SETGLOBAL:this_stop_after_current:0;
                        REFRESH,left,right)

    ,

    // stop after current deactivated

   $puts(this_filename_of_pic,Stop_weiss.png)
   $puts(x_promille,935)
   $puts(y_promille,310)
   $puts(this_width,50)
   $puts(this_original_width,1)
   $puts(this_original_height,1)

   $puts(this_position_X,$div($mul($get(x_promille),%_width%),1000))
   $puts(this_position_Y,$div($mul($get(y_promille),%_height%),1000))

   $imagebutton($get(this_position_X),$get(this_position_Y),$get(this_width),$muldiv($get(this_width),$get(this_original_height),$get(this_original_width)),.\my_pics\$get(this_filename_of_pic),.\my_pics\$get(this_filename_of_pic),
                        COMMAND:Playback/Stop after current;
                        SETGLOBAL:this_stop_after_current:1;
                        REFRESH,left,right)

)

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #2
With Columns UI Button toolbar, the button "Stop after current" changes background color, depending of activation state.

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #3
With Columns UI Button toolbar, the button "Stop after current" changes background color, depending of activation state.
Great, should have seen that earlier... Are there any other CUI buttons changing background with state?

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #4
Always on top, playback follows cursor, cursor follows playback

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #5
Within the Panel Stack Splitter I created a button which changes color using $imagebutton and a global variable:
Code: [Select]
// Stop after current

$init_ps_global(this_stop_after_current,0,1)

$if($stricmp(%this_stop_after_current%,'1'),

   // stop after current active

   $puts(this_filename_of_pic,Stop_tiefrot.png)
   $puts(x_promille,935)
   $puts(y_promille,310)
   $puts(this_width,50)
   $puts(this_original_width,1)
   $puts(this_original_height,1)

   $puts(this_position_X,$div($mul($get(x_promille),%_width%),1000))
   $puts(this_position_Y,$div($mul($get(y_promille),%_height%),1000))

   $imagebutton($get(this_position_X),$get(this_position_Y),$get(this_width),$muldiv($get(this_width),$get(this_original_height),$get(this_original_width)),.\my_pics\$get(this_filename_of_pic),.\my_pics\$get(this_filename_of_pic),
                        COMMAND:Playback/Stop after current;
                        SETGLOBAL:this_stop_after_current:0;
                        REFRESH,left,right)

    ,

    // stop after current deactivated

   $puts(this_filename_of_pic,Stop_weiss.png)
   $puts(x_promille,935)
   $puts(y_promille,310)
   $puts(this_width,50)
   $puts(this_original_width,1)
   $puts(this_original_height,1)

   $puts(this_position_X,$div($mul($get(x_promille),%_width%),1000))
   $puts(this_position_Y,$div($mul($get(y_promille),%_height%),1000))

   $imagebutton($get(this_position_X),$get(this_position_Y),$get(this_width),$muldiv($get(this_width),$get(this_original_height),$get(this_original_width)),.\my_pics\$get(this_filename_of_pic),.\my_pics\$get(this_filename_of_pic),
                        COMMAND:Playback/Stop after current;
                        SETGLOBAL:this_stop_after_current:1;
                        REFRESH,left,right)

)

nice how did you do this? i am not seeing "panel stack splitter" in my foobar. Do I need to paste the code you posted in VBC and then compile it as a program and then add it to my foobar as a component or what?

thanks!

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #6
With Columns UI Button toolbar, the button "Stop after current" changes background color, depending of activation state.

I downloaded and installed the columns UI componenet, but am not seeing any stop after current button or anything, how do I do that?

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #7
With Columns UI Button toolbar, the button "Stop after current" changes background color, depending of activation state.

I downloaded and installed the columns UI componenet, but am not seeing any stop after current button or anything, how do I do that?

You need to edit your visible button set. Just Right click on any of your buttons and go to "button options"

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #8
nice how did you do this? i am not seeing "panel stack splitter" in my foobar. Do I need to paste the code you posted in VBC and then compile it as a program and then add it to my foobar as a component or what?

thanks!
Well, I guess this is a longer story:
- this has nothing to do with Visual Basic Compiler (VBC), Panel Stack Splitter (PSS) is a foobar-internal capability
- Foobar has 2 user interfaces; Default UI (DUI) and Columns UI (CUI)
- PSS can only be used with Colums UI
- to get familiar with the concept of Columns UI, there are a lot of tutorials out there, for example here, here and here.
- the PSS is one type of panel which can be created in CUI. Info for PSS see for example here and here
- the concept of PSS is to span a UI area in the foobar window, where you can place different UI elements such as panels or buttons freely, even stack UI elements (that is where the name comes from)
- when you have created a PSS splitter in your layout, you find unter splitter settings a script tab, where you can paste the code under the tab 'Per Track'

However, the proposal  from grimes is much more straight forward

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #9
Always on top, playback follows cursor, cursor follows playback
Thanks snotlicker, was not aware of that at all until now!

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #10
Thank you Mojobass!!! I made the button the mandalorian symbol xD 

However I would like to change the layout to be like my regular foobar, i dont like the white color and idk how to change it, how can i make my regular foobar layout but keep the Stop after current button? I know my foobar layout is very simple, but its pragmatic for me and works 100% how i need it to, i just want the stop after current button haha but i can only get that on ColumnsUI which is white and doesnt have the media library search i guess that you get with %path% PRESENT auto playlist.


Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #11
Preferences | Display | Columns UI | Colours and fonts

media library search: Library | Search

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #12
Preferences | Display | Columns UI | Colours and fonts

media library search: Library | Search

nice thank you! problem is though when i open library search it just pops out as a window, any way to make it part of my layout like in my default UI?

Also I found the color options but when I change the colors they and hit apply they are not having any effect, any idea why?

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #13
Is the Element "Playlist view" in Colours set to Global?

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #14
Is the Element "Playlist view" in Colours set to Global?

yeah sorry i got the colors working now, but is there any way to integrate the media library search to my foobar rather than making it a seperate window?

Also is there a way to put a play arrow or highlight the song that is currently playing on the list?

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #15
Media library search as panel: Not possible, but you can use Quicksearch instead.

arrow: Preferences | Display | Columns UI | Playlist view | Columns | Title | Display script
Code: [Select]
$if(%_isplaying%,> )

Re: Anyway to add a button or visual indicator for "stop after current" on foobar200

Reply #16
Media library search as panel: Not possible, but you can use Quicksearch instead.

arrow: Preferences | Display | Columns UI | Playlist view | Columns | Title | Display script
Code: [Select]
$if(%_isplaying%,> )

I see thanks a lot! I think I finally got it setup how I want it, simple, but efficient! I added 4 more '>' arrows to make it easier to see the 'now playing' lol


 
SimplePortal 1.0.0 RC1 © 2008-2020