Help - Search - Members - Calendar
Full Version: foo_ui_panels
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
Pages: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57
FofR
You say that puis are only visual stuff, thing is - our layouts are very dependent on the grouping/sort modes (thats why group by was previously included in SCPL no?); We'd use the sort mode name or index to change group headers (e.g. from album name to artist name when grouping changed) or even the whole SCP (when sorting by a track title rather than an album); if a user doesn't have these functioning sort modes then the layout doesn't change correctly and things stop working. If we don't bundle the sort modes with the pui then they'll go ahead and try and sort anyway - this produces different errors.

Two cases:
Say I include a button on my layout that sorts by rating then folder, groups by rating.
A.) A user with this preset but with a different grouping/sort order will see a messed up playlist as either it groups wrong, the wrong group header text is displayed or the items appear in an order not consistent with the layout's design (for example including images in the item display requires strict ordering for the image to display correctly)
B.) A user without this preset will see nothing happen and not know why. Nor will they know how to correct the problem without the layout designer providing a tutorial. Something I don't see many people doing.

It's all about consistency; layouts inherently rely on playlist sorting/grouping to work correctly. When that sorting is not exactly the same things start getting messy. Group by code has always been in SCPL/puis until now, why remove it?

The best illustration would be for me to make a layout release and point you to the list of comments asking for help that would appear wink.gif
shakey_snake
Standardized preset names and some standardized User Globals (userFontFace,userFontSize,coverPath,artistImgPath, etc.) would be (IMO) absolutely awesome, and make these new features incredibly effective.
Right now they kind of aren't.

I think what we're kinda starting to see (because everything is scripted) is a kind of tiered system of of layout creators, layout modder's and layout users.
This could be a good or bad thing depending on your perspective, but I think it's reality, since this does take a fair bit of work (although it's definitely worth it).

I think standardizing a few things (like some user globals and preset names) is going to help everybody.


(btw, if the "Sort by group" checkbox overrides the "Group by" box, maybe checking that should ghost out the group by button and/or edit box)
Kiteroa
Terrestrial:

many thanks for clearing up all those outstanding questions - and all your work on this component!



QUOTE(shakey_snake @ Mar 31 2007, 10:08) *

Standardized preset names and some standardized User Globals (userFontFace,userFontSize,coverPath,artistImgPath, etc.) would be (IMO) absolutely awesome, and make these new features incredibly effective.
Right now they kind of aren't.

I think what we're kinda starting to see (because everything is scripted) is a kind of tiered system of of layout creators, layout modder's and layout users.
This could be a good or bad thing depending on your perspective, but I think it's reality, since this does take a fair bit of work (although it's definitely worth it).

I think standardizing a few things (like some user globals and preset names) is going to help everybody.


(btw, if the "Sort by group" checkbox overrides the "Group by" box, maybe checking that should ghost out the group by button and/or edit box)



Standardised preset and variable names is a great idea. Would you be prepared to post/start a thread putting up a set. Hopefully, then, those that want to can use the same names - without a huge debate on what they should be!
wraithdu
2 quickie questions -

1. Does $playlistname() have any arguments, or is it left empty and returns the active playlist?
2. Can you explain the $sortidx() function in a little more detail with an example and usage...I'm lost on that one.

EDIT: Ok, I got $sortidx(). It means if you have a sort criteria called 'bubblegum' for example, and it is in place '3' in a sorting PRESET, then $sortidx(bubblegum) returns '3'.
EDIT2: $playlistname() has no arguments. Placing something inside the () returns [UNKNOWN FUNCTION].
Chairman85
Why won't a song that is playing after being added to the playback queue return a true for %_isplaying% ?
Kiteroa
Feature request:

I'd like to display some tiny pictures etc. on the tracks they relate to. No problem setting a pvar in SCP and picking it up in panels_ui to put a button/Track Display in the right place on top of the SCP, everything refreshes nicely, no flickering etc. BUT when the SCP screen is scrolled panels-ui doesn't know and the buttons/TD are in wrong place!

Any chance you could give us a variable in SCP or panel_UI, or is (as I fear) scrolling handled elsewhere and not visible to your component?

D3WEY
Edit: nevermind
FofR
QUOTE
Does anyone know why, ever since switching to Panels UI, my drag'n'dropped playlist items always move to the bottom of the playlist?

...
you can't. scpl doesn't really support drag and drop positioning yet.


I distinctly remember being able to do this in SCPL, I would drag a track or album from Windows Explorer into foobar and the items would be placed after the now selected songs. After enabling the ColumnsUI "drop at end of playlist" feature these songs started being dropped at the end. Now trying to turn off this feature doesn't work. Was it somehow disabled in a PUI update?

Is the Single Columns Playlist selector code included with the PUI? i.e. the bit that looks like this
CODE
$if($or($isgrouped(album),$isgrouped(folder),$isgrouped(artist)),
    $scplsetlayout(Album)
,
    $scplsetlayout(Single)
)

)
c0utta
Hi terrestrial,

The latest PanelsUI version removes my "Track Display" dockable panel every time I restart foobar.

Cheers..
tomthomson
QUOTE(FofR @ Mar 31 2007, 10:59) *

QUOTE
Does anyone know why, ever since switching to Panels UI, my drag'n'dropped playlist items always move to the bottom of the playlist?

...
you can't. scpl doesn't really support drag and drop positioning yet.


I distinctly remember being able to do this in SCPL, I would drag a track or album from Windows Explorer into foobar and the items would be placed after the now selected songs. After enabling the ColumnsUI "drop at end of playlist" feature these songs started being dropped at the end. Now trying to turn off this feature doesn't work. Was it somehow disabled in a PUI update?

Seems like this option never worked with SCPL since I never touched this checkbox (i.e. disabled) and my drag'n'dropped files always moved to the bottom of the playlist.

Another problem wink.gif:
$playlistname() / %playlist_name% doesnt work as a sourting/grouping criteria code.
I want to do something like this in the "group by" box (shortened)
CODE
$if($strchr($playlistname(),'°'),!noheader!,%album%%discnumber%%disctitle%)

The problem is this condition never returns the TRUE statement
elenhil
Any chance of implementing subgrouping, Terrestrial?
metal_termite
Has anyone managed to successfully use foo_run commands in their buttons? I've only seen one (irrelevant) mention of it in this thread (unless the HA search doesn't return proper results).

The foo_ui_panels configuration window only shows Run service in the drop down context form so I guessed at what the commands for the foo_run services would be. I tried 'Run service/Name' and 'Run/Name' in my buttons to no avail. So either I am doing something wrong or foo_ui_panels is not compatible with this component yet. In the CWB Hooks component, the New File Tagger displays each user created foo_run context entry, so I imagine it should be possible, no?
carmenm
QUOTE(metal_termite @ Mar 31 2007, 22:55) *

Has anyone managed to successfully use foo_run commands in their buttons? I've only seen one (irrelevant) mention of it in this thread (unless the HA search doesn't return proper results).

The foo_ui_panels configuration window only shows Run service in the drop down context form so I guessed at what the commands for the foo_run services would be. I tried 'Run service/Name' and 'Run/Name' in my buttons to no avail. So either I am doing something wrong or foo_ui_panels is not compatible with this component yet. In the CWB Hooks component, the New File Tagger displays each user created foo_run context entry, so I imagine it should be possible, no?

works perfectly here. if my run command is artistimage i just put 'artistimage' in my button command and it works
metal_termite
QUOTE(carmenm @ Mar 31 2007, 18:40) *

works perfectly here. if my run command is artistimage i just put 'artistimage' in my button command and it works


I see, it is just the name of user-created entry itself. Thanks for the help.
Kiteroa
QUOTE(Kiteroa @ Mar 29 2007, 11:58) *

QUOTE(Yotsuya @ Mar 29 2007, 09:43) *

Is there any button command that will force a refresh of SCPL? If there was, we could stack this with any other button that tries to update the layout.


If the playlist is active you can use the utils menu command to "Send to playlist..." and choose the same playlist name.

Not sure how to get it as a button command - there is a component which gives separate menu commands with the appropriate playlist name on them which you may be able to refer to as a button command.

Easy to get the playlist name:

%cwb_activelist% - active playlist name
%cwb_playinglist% - playing playlist name

EDIT

Foo_utils "Edit other/Send to playlist/1 - Browser" type commands are only accessible from the buttons customise menu (i.e. for the foobar buttons bar). They do not appear in the commands in the drop-down in the panels-ui.



How about a button with a SORT command to force a refresh of SCP. Note that terrestrial now says the SORT command is "kinda deprecated" (I guess because he has provided new sorting/grouping functionality). I have never used the SORT myself but will try it soon.

gregory
using version 0.9.2
code is in a Track Display
CODE
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?
Chairman85
QUOTE(gregory @ Mar 31 2007, 16:38) *

using version 0.9.2
code is in a Track Display
CODE
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?

Try %_isplaying%
gregory
QUOTE(Chairman85 @ Mar 31 2007, 20:00) *
QUOTE(gregory @ Mar 31 2007, 16:38) *

using version 0.9.2
code is in a Track Display
CODE
$if(%isplaying%,
$ifequal(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)


i thought this would return the title of the last song that played to a second or more, but it just returns a ?
there is no other code in the Track Display
what am i doing wrong?

Try %_isplaying%


nope, still the same sad.gif
Yotsuya
QUOTE(terrestrial @ Mar 30 2007, 13:19) *
yeah, its something to do with codepages and unicode / utf8 conversion. it's crashing within scintialla, who's code I'm not familiar with so I'm not quite sure what's going on. I tried changing the codepage on my system to see if I could reproduce the crash but then vista refused to boot, which meant I had to reinstall :( does bringing up the scpl layout box ever cause a crash, or is it only the main panels ui settings dialog (the one with the formatting string).
Opening the SCPL setting dialog also crashes foobar. Again, if I change codepages it does not seem to crash. For the sake of experimentation here is the code I am currently using for the main panelsui config please let me know if there is a way I can code it to be more friendly with scintilla:
CODE
$drawrect(0,0,0,0,brushcolor-233-233-233 pencolor-null)

// Top Bar
$panel(Menu,Menu,0,0,250,20,)
$panel(Logo,Track Display,$sub(%_width%,55),0,55,20,)

// Top Panel
$puts(toppanel.numpanels,5)

$ifgreater($getpvar(toppanel.hide),0,
$button2($sub($div(%_width%,2),25),22,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),160,1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),160,1,5,brushcolor-0-0-0 pencolor-null)

$button2($sub($div(%_width%,2),25),162,0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.hide:$ifgreater($getpvar(toppanel.hide),0,0,1),'TOOLTIP:Hide Panel')

$ifgreater($getpvar(toppanel.mode),0,
$button2(0,160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),1,$sub($getpvar(toppanel.mode),1),0),TOOLTIP:'Previous Panel')
,)

$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),160,0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:toppanel.mode:$ifgreater($getpvar(toppanel.mode),$sub($get(toppanel.numpanels),2),$sub($get(toppanel.numpanels),1),$add($getpvar(toppanel.mode),1)),TOOLTIP:'Next Panel')
)

$select($add($getpvar(toppanel.mode),1),
$panel(Now Playing,Track Display,5,20,$sub(%_width%,10),140,)
,
$panel(Albums,Album list,0,20,%_width%,140,)
,
$panel(Queue,Queue Manager,0,20,%_width%,140,)
,
$panel(Lyrics,Lyric Show,0,20,%_width%,140,)
,
$panel(Console,Console,0,20,%_width%,140,)
)
)

$puts(mainpanel.y,$add(20,$ifgreater($getpvar(toppanel.hide),0,5,145)))
$puts(mainpanel.height,$sub(%_height%,$add(50,$ifgreater($getpvar(toppanel.hide),0,5,145),$ifgreater($getpvar(bottompanel.hide),0,2,50))))

// Main Panel
$select($add($getpvar(mainpanel.mode),1),

$panel(Lists,Playlists Dropdown,0,$get(mainpanel.y),150,20,)
$panel(Order,Playback order,150,$get(mainpanel.y),120,20,)
$panel(Search,Quick Search Toolbar,270,$get(mainpanel.y),$sub(%_width%,320),20,)

$button2($sub(%_width%,42),$get(mainpanel.y),0,0,14,14,X,x,PVAR:SET:playlist.mode:0,)
$button2($sub(%_width%,28),$get(mainpanel.y),0,0,14,14,Y,y,PVAR:SET:playlist.mode:1,)
$button2($sub(%_width%,14),$get(mainpanel.y),0,0,14,14,Z,z,PVAR:SET:playlist.mode:2,)

$panel(Playlist,Single Column Playlist,0,$add($get(mainpanel.y),20),%_width%,$sub($get(mainpanel.height),20),)
,
$panel(ProjectM,ProjectM Visualisation,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
,
$panel(Test,Track Display,0,$get(mainpanel.y),%_width%,$get(mainpanel.height),)
)


// Bottom Panel
$puts(bottompanel.y,$sub(%_height%,75))
$puts(bottompanel.height,45)
$puts(bottompanel.numpanels,3)

$puts(toolbox.icons,29)
$puts(toolbox.iconsize,34)
$puts(toolbox.max,$sub($mul($get(toolbox.icons),$get(toolbox.iconsize)),$ifgreater($sub(%_width%,50),0,$sub(%_width%,50),0)))
$puts(toolbox.step,$ifgreater($get(toolbox.max),$add($get(toolbox.offset),10),$add($get(toolbox.offset),10),$sub($get(toolbox.max),$get(toolbox.offset))))

$ifgreater($getpvar(bottompanel.hide),0,

$button2($sub($div(%_width%,2),25),$sub(%_height%,32),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Open Panel')
,
$drawrect($div(%_width%,3),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)
$drawrect($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),1,5,brushcolor-0-0-0 pencolor-null)

$button2($sub($div(%_width%,2),25),$sub(%_height%,79),0,0,50,2,'$drawrect(0,0,0,0,brushcolor-0-0-0 pencolor-null)','$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.hide:$ifgreater($getpvar(bottompanel.hide),0,0,1),'TOOLTIP:Hide Panel')

$ifgreater($getpvar(bottompanel.mode),0,
$button2(0,$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),1,$sub($getpvar(bottompanel.mode),1),0),TOOLTIP:'Previous Panel')
,)

$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),,
$button2($sub(%_width%,$div(%_width%,3)),$sub(%_height%,80),0,0,$div(%_width%,3),5,,'$drawrect(0,0,0,0,brushcolor-166-202-240 pencolor-null)',PVAR:SET:bottompanel.mode:$ifgreater($getpvar(bottompanel.mode),$sub($get(bottompanel.numpanels),2),$sub($get(bottompanel.numpanels),1),$add($getpvar(bottompanel.mode),1)),TOOLTIP:'Next Panel')
)

$select($add($getpvar(bottompanel.mode),1),
$panel(Egoh,Egoh Spectrum analyser,5,$sub(%_height%,75),$sub(%_width%,10),45,)
,
// -- Toolbox Start -- //
$drawrect(7,$add($get(bottompanel.y),1),$sub(%_width%,14),$sub($get(bottompanel.height),1),brushcolor-null pencolor-0-0-0)
$drawrect(10,$add($get(bottompanel.y),3),$sub(%_width%,20),$sub($get(bottompanel.height),5),brushcolor-0-0-0 pencolor-null)
$button2(2,$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\prev.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\prev_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),0,$sub($getpvar(toolbox.offset),$get(toolbox.step)),0),)
$button2($sub(%_width%,22),$add($get(bottompanel.y),13),0,0,20,20,'$imageabs2(20,20,,,,,,,/images\leokennis\next.png,)','$imageabs2(20,20,,,,,,,/images\leokennis\next_down.png,)',
PVAR:SET:toolbox.offset:$ifgreater($getpvar(toolbox.offset),$sub($get(toolbox.max),1),$get(toolbox.max),$add($getpvar(toolbox.offset),$get(toolbox.step))),)

$panel(Toolbox,Track Display,25,$add($get(bottompanel.y),3),$sub(%_width%,50),$sub($get(bottompanel.height),5),)
// -- Toolbox End -- //
,
$drawrect(5,$get(bottompanel.y),$sub(%_width%,10),$get(bottompanel.height),brushcolor-null pencolor-0-0-0)
$panel(Track Info,Track Display,7,$sub(%_height%,73),$sub(%_width%,14),41,)
)
)

// Bottom Bar
$panel(Progress,Seekbar,0,$sub(%_height%,30),%_width%,14,)

$puts(offset.button.x,$sub(%_width%,0))
$puts(offset.button.y,$sub(%_height%,15))
$button2(32,$get(offset.button.y),0,0,14,14,T,t,'PVAR:SET:mainpanel.mode:2',TOOLTIP:Test)
$button2(2,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.playlist.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:0',TOOLTIP:Playlist)
$button2(16,$get(offset.button.y),0,0,14,14,'$imageabs2(14,14,,,,,,,/images\Yotsuya\button.vis.png,)','$imageabs2(14,14,,,,,,,/images\Yotsuya\button.save.png,)','PVAR:SET:mainpanel.mode:1',TOOLTIP:Visualization)

$puts(offset.button.x,$div(%_width%,2))
$puts(offset.button.y,$sub(%_height%,16))
$button($sub($get(offset.button.x),50),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.left.prev.png,/images\Yotsuya\button.bright.left.prev.png,Previous,)
$button($sub($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.stop.png,/images\Yotsuya\button.bright.center.stop.png,Stop,)
$button($get(offset.button.x),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.center.$if(%ispaused%,pause,play).png,/images\Yotsuya\button.bright.center.$if(%ispaused%,pause,play).png,Play or Pause,TOOLTIP:$if(%isplaying%,$if(%ispaused%,Resume,Pause),Play))
$button($add($get(offset.button.x),25),$get(offset.button.y),0,0,0,0,/images\Yotsuya\button.dark.right.next.png,/images\Yotsuya\button.bright.right.next.png,Next,)

$panel(Volume,Volume,$sub(%_width%,100),$sub(%_height%,16),100,16,)

QUOTE(terrestrial @ Mar 30 2007, 13:19) *
the layout selector code is only evaluated when the playlist changes / or a new sorting/grouping is applied. ideally you shouldn't have to manually select a layout, but the layout should be automatically chosen based on the sorting/grouping pattern. with the new sort/group main menu with the new version you should be able to create a preset and button as a workaround though.
I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist). While this could be accomplished by switching sort/group patterns I think that switching layouts would offer much more flexibilty. The mechanisms to accomplish this all appear to be there there if we could somehow force SCPL to refresh. I have read several other posts where users have requested the ability to force SCPL to refresh for various reasions. Would it be possible to add a button command to force the refresh? We could then stack this on any other button to accomplish various things. Maybe a way to hook into when pvars are set to trigger a refresh. The new layout code appears to be very powerful but if it is not re-evaluated when the variables change then it loses much of its potential functionality.
Yotsuya
gregory: Is this more in line with what you are looking for?
CODE
// PerSecond
$if(%isplaying%,
$ifgreater(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)

With your previous code, the pvar would only be set when playback time is equal to one second not if it is greater. Also, unless you place this under a // PerSecond header it will not be re-evaluated every second.

By The Way... this question lead me to stumble upon a solution for a long time problem. How to show a list of the last played songs even accross foobar restarts. Well give this a try, it should be fairly obvious how to expand it past 3 tracks:
CODE
// PerTrack
$if(%isplaying%,
$setpvar(lastplayed.3,$getpvar(lastplayed.2))
$setpvar(lastplayed.2,$getpvar(lastplayed.1))
$setpvar(lastplayed.1,[%album artist% - ]%title%)
,)

// PerSecond
$alignabs(0,0,%_width%,15,,)$if2($getpvar(lastplayed.1),No Track)
$alignabs(0,15,%_width%,15,,)$if2($getpvar(lastplayed.2),No Track)
$alignabs(0,30,%_width%,15,,)$if2($getpvar(lastplayed.3),No Track)

(With creative use of the above code it should be a simple matter to apply time limitations to what is considered a played track)
CepiPerez
QUOTE(Yotsuya @ Apr 1 2007, 00:37) *

I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist)....

I made a Sort/Group Criteria called "Singles" with "Group by sort" enabled and nothing in the code.
Then I made a Preset called "Singles" wich uses this criteria.
And a $button using "Singles" action.
That's how I can change between Albums and Singles on the same Playlist.
Is that what you are trying to do?
Yotsuya
CepiPerez: I played around and got that approach to work per terrestrials earlier suggestion, however I would like to be able to switch SCPL layouts not just sort/group by criteria.

BTW:: I'm having some fun making a playback history panel.
jclim00
QUOTE(CepiPerez @ Apr 1 2007, 00:31) *

QUOTE(Yotsuya @ Apr 1 2007, 00:37) *

I would like the ability to manually switch layouts on the same playlist with a button. (i.e.: album vs. singles groupings on the same playlist)....

I made a Sort/Group Criteria called "Singles" with "Group by sort" enabled and nothing in the code.
Then I made a Preset called "Singles" wich uses this criteria.
And a $button using "Singles" action.
That's how I can change between Albums and Singles on the same Playlist.
Is that what you are trying to do?


The problem with that is when you're distributing your PUI, it adds an extra 3 steps for the user to set that up for the buttons to work. It would be easier with a direct button command to just switch the playlist type.
gregory
QUOTE(Yotsuya @ Mar 31 2007, 23:41) *
gregory: Is this more in line with what you are looking for?
CODE
// PerSecond
$if(%isplaying%,
$ifgreater(%playback_time_seconds%,1,$setpvar(title,%title%),)
,)

$getpvar(title)

With your previous code, the pvar would only be set when playback time is equal to one second not if it is greater. Also, unless you place this under a // PerSecond header it will not be re-evaluated every second.

By The Way... this question lead me to stumble upon a solution for a long time problem. How to show a list of the last played songs even accross foobar restarts. Well give this a try, it should be fairly obvious how to expand it past 3 tracks:
CODE
// PerTrack
$if(%isplaying%,
$setpvar(lastplayed.3,$getpvar(lastplayed.2))
$setpvar(lastplayed.2,$getpvar(lastplayed.1))
$setpvar(lastplayed.1,[%album artist% - ]%title%)
,)

// PerSecond
$alignabs(0,0,%_width%,15,,)$if2($getpvar(lastplayed.1),No Track)
$alignabs(0,15,%_width%,15,,)$if2($getpvar(lastplayed.2),No Track)
$alignabs(0,30,%_width%,15,,)$if2($getpvar(lastplayed.3),No Track)

(With creative use of the above code it should be a simple matter to apply time limitations to what is considered a played track)


yeah, actually that's exactly what i am trying to do, it's something i actually saw in another post
i just posted a stripped down version, trying to find out why the pvars wouldn't work

here is the full code that doesn't work, i'm gonna try it your way, thx for the help
CODE
// PerTrack

$if(%isplaying%,

$ifequal(%playback_time_seconds%,0,$setpvar(album art,$replace(%path%,%filename_ext%,folder.jpg)),)
$ifequal(%playback_time_seconds%,0,$setpvar(last played,%last_played%),)
$ifequal(%playback_time_seconds%,0,$setpvar(artist,%album artist%),)
$ifequal(%playback_time_seconds%,0,$setpvar(title,%title%),)

$ifequal(%playback_time_seconds%,0,$setpvar(album art 3,$getpvar(album art 2)) $setpvar(album art 2,$getpvar(album art)),)
$ifequal(%playback_time_seconds%,0,$setpvar(last played 3,$getpvar(last played 2)) $setpvar(last played 2,$getpvar(last played)),)
$ifequal(%playback_time_seconds%,0,$setpvar(artist 3,$getpvar(artist 2)) $setpvar(artist 2,$getpvar(artist)),)
$ifequal(%playback_time_seconds%,0,$setpvar(title 3,$getpvar(title 2)) $setpvar(title 2,$getpvar(title)),)

,)

$imageabs2(50,50,,,,,,,$getpvar(album art),)
$alignabs(50,,350,50,left,middle)
$font(gorilla milkshake,10,,192-192-128)
$if2($getpvar(last played),)
$char(10)
$if2($getpvar(artist) - $getpvar(title),)

$imageabs2(50,50,,,,,,60,$getpvar(album art 2),)
$alignabs(50,60,350,50,left,middle)
$if2($getpvar(last played 2),)
$char(10)
$if2($getpvar(artist 2) - $getpvar(title 2),)

$imageabs2(50,50,,,,,,120,$getpvar(album art 3),)
$alignabs(50,120,350,50,left,middle)
$if2($getpvar(last played 3),)
$char(10)
$if2($getpvar(artist 3) - $getpvar(title 3),)


turns out the code does almost wink.gif work, i was using an $if($isplaying,... to show two different groupings of panels, one if there was a song playing, and another if there was not one playing, this is what prevented the code from functioning
maced
Where can I download version 0.8.1?
wraithdu
QUOTE(Yotsuya @ Apr 1 2007, 00:37) *

CepiPerez: I played around and got that approach to work per terrestrials earlier suggestion, however I would like to be able to switch SCPL layouts not just sort/group by criteria.

Using the Layout Selector code, isn't that exactly what you will accomplish by changing the the sort/group criteria? I can see where you're coming from though, it's kinda backwards. It would make more logical sense to have a sort/group by criteria/preset/etc tied to a specific layout, not the other way around.
Blippe
Bug?:

$button2(,,X,Y,W,H,,,,)

"X, Y, W(idth) & H(eight)
X an Y define the position of the upper left corner of the button's active area relative to that of the text or image's top-left corner, W and H define the width and height of the active area of the button (W and H do not resize the button images or text)."

If a text doesn't fit in the allocated area, it aint shown... Problem is, the allocated area is not calculated as X+W, that is $button2(,,10,0,10,0,++,++,,) doesn't show, and $button2(,,10,0,20,0,++,++,,) gives you a plus which aint clickable, one plus which is, and a clickable space of 10 pixels without signs. (all given a '+' takes 10 pixels.)

wraithdu
QUOTE(maced @ Apr 1 2007, 09:15) *

Where can I download version 0.8.1?

Here ya go.

http://www.megaupload.com/?d=94ZY5SO1
maced
Thanks.
QUOTE(wraithdu @ Apr 1 2007, 08:26) *

QUOTE(maced @ Apr 1 2007, 09:15) *

Where can I download version 0.8.1?

Here ya go.

http://www.megaupload.com/?d=94ZY5SO1

Yotsuya
QUOTE(wraithdu @ Apr 1 2007, 10:19) *
Using the Layout Selector code, isn't that exactly what you will accomplish by changing the the sort/group criteria? I can see where you're coming from though, it's kinda backwards. It would make more logical sense to have a sort/group by criteria/preset/etc tied to a specific layout, not the other way around.

Is there any way to programatically change the Sort/Group By preset automatically based on code? For example automatically switch presets based on $playlistname() ? I can do it manually with a button under the newer build but I wonder if we can have the preset change when we change the active playlist.
Nickoladze
I'm sure this has been asked before but, is there a way to make the background of panels transparent so I can see through to the panel underneath it?

I have a track display panel behind all the other panels with a background image and I want to see it show through the panels above it.
metal_termite
QUOTE(Nickoladze @ Apr 1 2007, 15:42) *

I'm sure this has been asked before but, is there a way to make the background of panels transparent so I can see through to the panel underneath it?

I have a track display panel behind all the other panels with a background image and I want to see it show through the panels above it.

You can't. As I understand it foo_ui_panels cannot dictate what panels can be transparent, the panels have to support it natively. I don't know if a Track Display panel can be made transparent or not.
Nickoladze
QUOTE(metal_termite @ Apr 1 2007, 15:11) *

QUOTE(Nickoladze @ Apr 1 2007, 15:42) *

I'm sure this has been asked before but, is there a way to make the background of panels transparent so I can see through to the panel underneath it?

I have a track display panel behind all the other panels with a background image and I want to see it show through the panels above it.

You can't. As I understand it foo_ui_panels cannot dictate what panels can be transparent, the panels have to support it natively. I don't know if a Track Display panel can be made transparent or not.


Okay well the only panel I really need transparent is the SCPL, since Terrestrial also makes that, I'll just hope he sees this post instead of reposting in the SCPL thread.
Nickoladze
When I check the option to hide the titlebar, I can't minimize the window.

Is that a Windows restriction? I'm on Vista.
4nt1
with the latest version 0.9.2
my sort/group by works perfectly until i close foobar

once i reload it the same sort/group by pattern is displayed but none of the headers are there - so I have to re apply the sorting and then it work.

I am using scpl through columns ui = could this have something to do with it

another question - does panels ui work with the album art component - I use it because of the way it allows me to get my album and artist art working...
TheBlackCat
QUOTE(terrestrial @ Mar 30 2007, 12:19) *

post your button images and I will take a look.


Thanks a lot. Here they are: Buttons.
shakey_snake
QUOTE(Kiteroa @ Mar 30 2007, 19:57) *

Standardised preset and variable names is a great idea. Would you be prepared to post/start a thread putting up a set. Hopefully, then, those that want to can use the same names - without a huge debate on what they should be!
um... well, my hope is that Terrestrial will incorporate some standards into panelsUI itself, as he defines them.
RowAndTheWriter
Could you map the Esc key to close the panel configuration window? I always tap it, out of habit, heh.
Luis Branco
I am sorry guys, but is it my problem, or is only version 0.8 available to download?
When i download from the download link from the post #1 i always get the old version, maybe my proxy if getting it always wrong?
If someone cut put it in another place for dl that would be great!

thanks!
FofR
Terrestrial: Any chance of getting those sort by strings included in the pui? Even knowing the code I needed to change and add it just took me an hour to setup fb2k on a new machine (not including components, etc.)
shakey_snake
QUOTE(RowAndTheWriter @ Apr 2 2007, 03:42) *

Could you map the Esc key to close the panel configuration window? I always tap it, out of habit, heh.
When has esc ever closed anything?
alt-f4, wfm.

QUOTE(Luis Branco @ Apr 2 2007, 04:43) *

I am sorry guys, but is it my problem, or is only version 0.8 available to download?
When i download from the download link from the post #1 i always get the old version, maybe my proxy if getting it always wrong?
If someone cut put it in another place for dl that would be great!

thanks!
have you tried clearing your browser's cache?
anolae
QUOTE(shakey_snake @ Apr 2 2007, 13:01) *

QUOTE(RowAndTheWriter @ Apr 2 2007, 03:42) *

Could you map the Esc key to close the panel configuration window? I always tap it, out of habit, heh.
When has esc ever closed anything?
alt-f4, wfm.

Esc very often closes all dialog windows (such as "Options" windows). It is a very common feature.
shakey_snake
interesting, I've never noticed that before.
tommy_gun
hi, i'm using the new panels ui too (0.9.2)
but the single column playlist doesn't show pngs at all... my code is only copied from snowsfall... but it worked with one of the older panels_ui perfect crying.gif
CepiPerez
QUOTE(tommy_gun @ Apr 2 2007, 16:40) *

hi, i'm using the new panels ui too (0.9.2)
but the single column playlist doesn't show pngs at all... my code is only copied from snowsfall... but it worked with one of the older panels_ui perfect crying.gif

Try right click on the playlist, Sort / group by -> Artist / Date / Album
tommy_gun
works... thanx, but why is it all so complicated now? and another thing...
will the wiki be updated with all the new features? would be really nice
tomthomson
QUOTE(tomthomson @ Mar 31 2007, 15:13) *
CODE
$if($strcmp($playlistname(),'°'),!noheader!,%album%%discnumber%%disctitle%)
The problem is this condition never returns the TRUE statement

Well, just found the "mistake" in my code. Seems like the ° character isn't supported/recognized in the sort/group by criteria field. Replaced it by # and it worked smile.gif
iElectric
$button(DstX,DstY,X,Y,W,H,IMAGE,HOVER IMAGE,COMMAND,OPTIONS)

Is it possible to exec 2 COMMANDS?

I want button to exec:
- Play
- PVAR:SET:status:1

like this(only that this doesn't work):
$button(0,0,0,0,0,0,images\play.png,images\play_hover.png,PVAR:SET:status:1&&Play,)
Chairman85
QUOTE(4nt1 @ Apr 1 2007, 19:40) *

with the latest version 0.9.2
my sort/group by works perfectly until i close foobar

once i reload it the same sort/group by pattern is displayed but none of the headers are there - so I have to re apply the sorting and then it work.

I am using scpl through columns ui = could this have something to do with it


I can confirm I have this problem as well. Same setup, Win XP Pro SP2.
Kiteroa
QUOTE(iElectric @ Apr 3 2007, 10:03) *

$button(DstX,DstY,X,Y,W,H,IMAGE,HOVER IMAGE,COMMAND,OPTIONS)

Is it possible to exec 2 COMMANDS?

I want button to exec:
- Play
- PVAR:SET:status:1

like this(only that this doesn't work):
$button(0,0,0,0,0,0,images\play.png,images\play_hover.png,PVAR:SET:status:1&&Play,)



Yes, you can execute multiple commands: each should be in a separate button and both buttons should occupy the same space, viz:

$button(0,0,0,0,0,0,images\play.png,images\play_hover.png,Play,)
$button(0,0,0,0,0,0,images\play.png,images\play_hover.png,PVAR:SET:status:1,)

At the moment, execution will stop when a main or context menu command is executed, so the PVAR:SET will need to be positioned so it is executed first (which I guess is in the order above, (topmost button executed first) but if that doesnt work try the other way round).
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.