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: foo_ui_panels (Read 1317592 times) previous topic - next topic
0 Members and 8 Guests are viewing this topic.

foo_ui_panels

Reply #850
Is it possible to exec 2 COMMANDS?

This has been discussed before, in order to make a button to execute multiple commands you will need to stack multiple buttons on top of each other. This way when you click on the spot all buttons are clicked.  Example:
Code: [Select]
$button(2,2,0,0,10,10,,,PVAR:SET:test:1,)
$button(2,2,0,0,10,10,$if(%ispaused%,pause,play).png,$if(%ispaused%,pause,play)_hover.png,
Play or Pause,TOOLTIP:$if(%isplaying%,$if(%ispaused%,Resume,Pause),Play))

foo_ui_panels

Reply #851
When I check the option to hide the titlebar, I can't minimize the window.

Is that a Windows restriction? I'm on Vista.


How were you planning on minimizing the window after you'd hidden the titlebar?

I run WinXP and don't use a shell. However, I still want a cool looking titlebar so I have made my own titlebar complete with pretty buttons and I'd love to give it the normal windows functionality, but I can only find a command to exit... so my exit button works, but the other three (system, minimise and maximize) do not. Any idea how to make a button minimise or maximise a window?

Then for my undying gratitude, any idea how to replicate clicking on the top left button (Restore, Move, Size, Minimize, Maximize)?



Cheers,
Rukh


foo_ui_panels

Reply #853
I run WinXP and don't use a shell. However, I still want a cool looking titlebar so I have made my own titlebar complete with pretty buttons and I'd love to give it the normal windows functionality, but I can only find a command to exit... so my exit button works, but the other three (system, minimise and maximize) do not. Any idea how to make a button minimise or maximise a window?

The command to minimise is "Hide"
The command to restore is "Activate"
There is also a combination command "Activate or hide"
These commands are available as keyboard shortcuts or button command (though I dunno how you would click a button when foobar is minimized)

I was unable to find a command for maximize, what do you mean by "system" ?

foo_ui_panels

Reply #854
Hey there, I'm trying to get some code using pvars (makes sense to me) that will take a set number, and add that number together each time its used.

For example, I have the number 20. I use that as a buttons 'X' position from the left of the screen. I want the next button to be 40 from the left of the screen. Then the next one to be 60 from the left, and so on.

I was trying to make some code that will take the 20 pvar, and add 20 to it (using the $eval() function). Then take that previous answer (which would be 40) and add another 20 onto it. Then it would take that answer (which would be 60) and add 20 more onto that. And so on.

Does that make sense? Is this possible with $eval() and/or PVARs? If so, could someone possibly help  ?

Thanks .
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

foo_ui_panels

Reply #855
$eval() will use any will solve any mathematical expression inside the parentheses. That expression can contain any title formating functions or variables.
In the same way, the fields of $setpvar() can contain anything.

You should be able to do this yourself. (and even then, if you know the 2nd button is going to be at 40, a variable is pointless)
elevatorladylevitateme

foo_ui_panels

Reply #856
I hate to add yet another suggestion, but the new grouping system made me think of it and I think it would pretty useful (and hopefully not too difficult), and would solve several outstanding issues.

Currently there is a single row size and single group rows, implemented in the main SCPL config window.  This wouldn't change that.  However, in addition I think it would be really useful to have an additional place to set these parameters.  The ideal place, in my opinion, would be in the new Sort/Group Criteria Config windows (the one where you code the primary sort, secondary sort, and group parameters). 

I would add a fourth section.  This section would have a duplicate of the "Row Height", "Group Rows" and perhaps "Background Color" input fields that would apply only to that grouping criteroa.  Also, right below the "Group By Sort" check box there would be an additional "Use Default Row/Group Height" check box.  If that box is checked, as it would be by default, the settings from the main config window will be used.  If it is unchecked, the settings for that particular grouping method will be used when you are grouping by that criteria.  This would allow you to change the size setting based on the grouping method. 

You would also be able to have duplicates of your grouping criteria but with different row and/or header sizes (and different names obviously).  This would solve the problem of changing row and header size on the fly.  You could just switch between otherwise identical grouping presets in order to change those settings.  It would not be entirely on the fly but it would be close enough I think.  And the new ability to detect what grouping method is used would supply a built-in method for programmers to specify different settings depending on what row and header size is selected.

Unfortunately, this would lead to conflicts if you are grouping in more than one way.  Those settings could probably only be used if that particular grouping method is used as the highest-level grouping method or the lowest-level (I am not sure which).  That may be a bit complicated to code, and is the main drawback from my (very limited) perspective.

I think this would pretty useful.  For instance, if you are grouping by album you might want enough room for album art.  On the other hand, if you are grouping by the first letter in the song title you would likely only want a single line for that one letter.  But as far as I can tell there is no way to dynamically change this, you either need to use a less-than-optimal size for one or more grouping methods or change it manually every time in the config window.

This would become even more important if you implement the "Minimum group size" option.  The minimum group size could change considerably depending on which grouping method you use.  So having this option in the same places would be critical IMO. 


I also have a much, much more minor suggestion.  I think it would be nice if the "Group By" text box changed color (maybe a gray background) when the "Group by Sort" check box is checked, just so people can easily tell that the code in that box will not be used.  You would still be able to type, the background would just be a different color.  Same for the above suggestion if you implement it.  I think this might preemptively solve numerous technical help requests that otherwise might be hard to diagnose.  This is more of a "nice thing to have if you are ever bored" sort of idea as opposed to something pressing, but I thought I might as well add it.

foo_ui_panels

Reply #857
$eval() will use any will solve any mathematical expression inside the parentheses. That expression can contain any title formating functions or variables.
In the same way, the fields of $setpvar() can contain anything.

You should be able to do this yourself. (and even then, if you know the 2nd button is going to be at 40, a variable is pointless)


Maybe I'm just a little dumb when it comes to this lol.

I have about 30 buttons.
$puts(buty,350)
$button2(20,$get(buty),0,0,12,12,'1','1',TAG:SET:tracknumber:1,)
$button2(40,$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:2,)
$button2(60,$get(buty),0,0,12,12,'3','3',TAG:SET:tracknumber:3,)
etc.

Now I want the 'X' variable to increase by 20 for all the buttons (so 20, 40, 60, 80, 100, 120, 140 etc)

I have tried:

$eval(20+20) --> gives me 40 for everything
$eval(20+{20+20}) --> gives me 60 for everything

And a few other combinations of numbers, signs, and brackets. I have had no luck trying to figure this out myself with help from the title formatting in the wiki, or the panels_ui wiki entry. Which is why I asked here .
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

foo_ui_panels

Reply #858
Thanks Kiteroa! Just what i waned. One more thing.. Is there a way to change display options through console for splitters between panels?

foo_ui_panels

Reply #859
Keiko, try this:



$puts(incrx,0)
$button2($put(incrx,$eval($get(incrx)+20)),$get(buty),0,0,12,12,'1','1',TAG:SET:tracknumber:1,)
$button2($put(incrx,$eval($get(incrx)+20)),$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:2,)
$button2($put(incrx,$eval($get(incrx)+20)),$get(buty),0,0,12,12,'3','3',TAG:SET:tracknumber:3,)
etc.



Basically this stores a variable "incrx" with a value of zero (the variable name does not matter as long as it is consistent across the buttons).  Each time you make a button it retrieves the value, adds 20, then stores it again (sending the new value to the button function in the process).  The next button then retrieves this new, larger value and the process repeats.  Each successive button retrieves the value stored by the previous button then increments it for its own use and for later buttons.  Hopefully this gets the job done for you.

foo_ui_panels

Reply #860
I have about 30 buttons.
$puts(buty,350)
$button2(20,$get(buty),0,0,12,12,'1','1',TAG:SET:tracknumber:1,)
$button2(40,$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:2,)
$button2(60,$get(buty),0,0,12,12,'3','3',TAG:SET:tracknumber:3,)
etc.

Now I want the 'X' variable to increase by 20 for all the buttons (so 20, 40, 60, 80, 100, 120, 140 etc)

Have you tried something like this?:
$puts(butx,20)
$puts(buty,350)
$puts(butwidth,20)

$button2($get(butx),$get(buty),0,0,12,12,'1','1',TAG:SET:tracknumber:1,)
$button2($add($get(butx),$get(butwidth)),$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:2,)
$button2($add($get(butx),$mul($get(butwidth),2)),$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:3,)
$button2($add($get(butx),$mul($get(butwidth),3)),$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:4,)
$button2($add($get(butx),$mul($get(butwidth),4)),$get(buty),0,0,12,12,'2','2',TAG:SET:tracknumber:5,)
etc.

foo_ui_panels

Reply #861
i'm not sure but are you sure there isn't error in $button WINDOWSIZE?

according to wiki:
$button(DstX,DstY,X,Y,W,H,IMAGE,IMAGE HOVER,COMMAND,OPTIONS)

it should works something like this:
$button(30,20,0,0,18,18,arrow.png,arrow2.png,TAG:SET:rating:1,WINDOWSIZE:200:400:LEFT:TOP)

but it isn't!!! for me is it working only when:
$button(30,20,0,0,18,18,arrow.png,arrow2.png,WINDOWSIZE:200:400:LEFT:TOP,)

i tried to swap OPTIONS and COMMAND position but it didn't help.
anybody noticed this?

foo_ui_panels

Reply #862
I run WinXP and don't use a shell. However, I still want a cool looking titlebar so I have made my own titlebar complete with pretty buttons and I'd love to give it the normal windows functionality, but I can only find a command to exit... so my exit button works, but the other three (system, minimise and maximize) do not. Any idea how to make a button minimise or maximise a window?

The command to minimise is "Hide"
The command to restore is "Activate"
There is also a combination command "Activate or hide"
These commands are available as keyboard shortcuts or button command (though I dunno how you would click a button when foobar is minimized)

I was unable to find a command for maximize, what do you mean by "system" ?


Thanks! Halfway there... Anyone know a command or a way to get a button to Maximize?

By system I mean (and I don't know what this should be called), the icon in the top left of the screen, the icon at the left of the titlebar that has a menu - Restore, Move, Size, Minimize, Maximize, Close.

foo_ui_panels

Reply #863
While updating foo_ui_panels to the newest version (though, I only use it for SCPL) I ran into a problem: when I start foobar it doesn't group the songs at first. It only groups the songs when I switch to an other playlist.

foo_ui_panels

Reply #864
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.


yes, the layouts are dependent on the grouping/sort mode, which is why there is the layout selector. It should automatically match the appropriate layout (or probably "Singles" if the appropriate one doesn't exist), to the current group/sort mode. So, if you're grouping by album, the "Album" layout will be used. Likewise, if you're grouping by artist, the "Artist" layout will be used. The layout selector probably needs better defaults, so I'm open to suggestions. Also, the layout names will need to be standardized (so "Album" is designed around grouping albums instead of something else).

I think what you're trying to do is probably use one layout to handle both artist and album groupings, and while this could be made to work, I think it would be better to split them into two.

Quote
Two cases:
Say I include a button on my layout that sorts by rating then folder, groups by rating.


It would probably be better to have a button that applies preset 1 (maybe something like "Sort by $presetname(1)", although this function doesn't exist yet...). This way the user would get always get something useful and appropriate for them.

Quote
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)


no, they would never see a messed up playlist because the layout selector should always choose a correct layout based on the current sort/group mode. If you have a preset called "foo" that sorts/groups by album, then when you hit "foo" you will see the "Album" layout. If someone else has a preset called "foo" that sorts randomly, then they will see the "Singles" layout.

As for including images in the item display, using item index instead of track number should handle most of the problems. If you want to do something like group/sort by artist, then sort by album and display album covers in the item display, the layout selector should make sure that all the correct criteria are applied before calling that layout.

The reason for not including the sort / group strings in the pui is that each person has a different way of sorting/grouping. For example, how do you define what is a single and what is part of an album? do you prefer to sort by artist/date/album or by date/artist/album? do you even use the %rating% tag? Including this stuff in the pui makes it work to the pui creators preference, but for others there will always be the need to edit each pui for their preferences. With the current way, you only need to set up your sort/group settings and layout selector code once and it will work across all puis.


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?


hmmm, I'm not clear on what you're trying to do... maybe a screenshot?

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?


no, it would working differently under columns ui vs. panels ui.

Quote
Is the Single Columns Playlist selector code included with the PUI?


no, it is stored in the .cfg. I am looking for better defaults though.

Another problem :
$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: [Select]
$if($strchr($playlistname(),'°'),!noheader!,%album%%discnumber%%disctitle%)

The problem is this condition never returns the TRUE statement


the grouping/sorting criteria code don't take any other functions other than the stock foobar ones (to remain as fast as possible). you can, however, use the layout selector to select a different layout base on playlist name (eg singles), although you can't (currently) remove the groupsl.

Any chance of implementing subgrouping, Terrestrial?


not in the near future

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.


with albums vs singles, you would group by album for the former and not for the latter, and let the layout selector pick the appropriate layout. but you want to switch layouts with the exact same grouping/sorting pattern? In that case the best way is to add a dummy group/sort criteria and use that in the layout selector to force one or the other. eg add a criteria called "Force Single Layout" and in the layout selector check if $isgrouped(Force Single Layout) and set the singles layout. The reason for this step instead of directly being able to select a layout is that this will make your selection "stick", otherwise it would be reset to something else each time the layout selector is run.

foo_ui_panels

Reply #865
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.


No, there really isn't any need to manually set the playlist type. Just have the ability to set different presets, and let the layout selector handle the rest.

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)."


$button2 doesn't have a "hot spot" area. its $button2(x,y,-,-,w,h,,,,) (the - are not used).


Where can I download version 0.8.1?

Here ya go.

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


please don't upload older versions to a publicly accessible location. if you need to send an older version to somebody, use pm.

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.


that's a good idea.. I'll implement something like this in the future.

When I check the option to hide the titlebar, I can't minimize the window.

Is that a Windows restriction? I'm on Vista.


use the tray icon to minimize / resotre.

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.)


I can change / add defaults. What kind of sort/group strings were you adding?

I hate to add yet another suggestion, but the new grouping system made me think of it and I think it would pretty useful (and hopefully not too difficult), and would solve several outstanding issues.

Currently there is a single row size and single group rows, implemented in the main SCPL config window.


no, you can have multiple row heights / group rows with different layouts. I'm pretty sure you can get the functionality you want by using different layouts and using the layout selector.

 

foo_ui_panels

Reply #866
For standard layout names I'm come up with the following:
  • Album: Designed for grouping by album. Use item index instead of track number to display album art in the item display. Also check "isSingle" user global to see if the file is part of an album or not, and display headers and art, if any, appropriately.
  • Artist: Designed for grouping by artist.
  • Artist-Album: Designed for sorting/grouping by artist, then sorting by album and tracknumber. Should handle "isSingle" appropriately.
  • Rating: Designed for grouping by rating.
  • Singles: Default. Assumes no grouping or sorting.

If you have any more suggestions or alterations, let me know. I will incorporate these into the new default layout selector code.

For user globals:
  • coverPath: the cover file
  • isSingle: "1" is the file is a "single" or "0" if it's part of an album.
  • artistPath: the artist image file.

any others or any changes?

I'm also interested in any new sort/grouping criteria people are adding or changing, and if appropriate can add them to the defaults. so let me know what changes you've made to your sorting / grouping criteria.

foo_ui_panels

Reply #867

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)."


$button2 doesn't have a "hot spot" area. its $button2(x,y,-,-,w,h,,,,) (the - are not used).


Sorry, but
$button2(694,$get(yOffset),19,,38,24,'$font(Webdings,14,glow-209-208-210 glowblur-10,249-248-250)'YY,'$font(Webdings,14,glow-209-208-210 glowblur-10,40-40-40)'YY,TAG:SET:Rating:2,context-selected TOOLTIP:"Set rating to 2")
and
$button2(694,$get(yOffset),,,38,24,'$font(Webdings,14,glow-209-208-210 glowblur-10,249-248-250)'YY,'$font(Webdings,14,glow-209-208-210 glowblur-10,40-40-40)'YY,TAG:SET:Rating:2,context-selected TOOLTIP:"Set rating to 2")
show up very different despite the only difference is the 19 in the third input.
Om jag var söt som jocke thå,
skulle du tycka om mig då?

foo_ui_panels

Reply #868
yeah, the 19 actually subtracts from the 38. It should just be either left blank, or 0.

foo_ui_panels

Reply #869
For standard layout names I'm come up with the following:
  • Album: Designed for grouping by album. Use item index instead of track number to display album art in the item display. Also check "isSingle" user global to see if the file is part of an album or not, and display headers and art, if any, appropriately.
  • Artist: Designed for grouping by artist.
  • Artist-Album: Designed for sorting/grouping by artist, then sorting by album and tracknumber. Should handle "isSingle" appropriately.
  • Rating: Designed for grouping by rating.
  • Singles: Default. Assumes no grouping or sorting.
If you have any more suggestions or alterations, let me know. I will incorporate these into the new default layout selector code.

For user globals:
  • coverPath: the cover file
  • isSingle: "1" is the file is a "single" or "0" if it's part of an album.
  • artistPath: the artist image file.
any others or any changes?

I'm also interested in any new sort/grouping criteria people are adding or changing, and if appropriate can add them to the defaults. so let me know what changes you've made to your sorting / grouping criteria.
Awesome. Sounds great. Can't wait for the next release.
elevatorladylevitateme

foo_ui_panels

Reply #870
Is it possible to change the background of panels with this component?

I know it isn't right now, but would it be possible to be added in as a feature?

I'm mainly interested in setting background images for SCPL and album list.

foo_ui_panels

Reply #871
For SCPL, Trackinfo panels and the main panelsUI:
if you want a solid bg, use $drawrect()
if you want to use an image as BG, use $imageabs2()

all other panels are drawn by their own component.
elevatorladylevitateme

foo_ui_panels

Reply #872
bugs?

using version 0.9.2

a couple of things

1)when the foobar2000 window is showing(not minimized to tray), the ram usage is around 60,000 K which has been normal for me, i guess all the images i have, but when i minimize to the system tray, the ram usage drops down to 880 K, is there some intentional clearing going on?
2)everytime i close out of the program, the desktop flickers wildly for about 2-3 seconds, the icons all blink, it's like the desktop is refreshing repeatedly at a rapid rate

great component, thanks for all the hard work 

oh and in response to:
Quote
I'm also interested in any new sort/grouping criteria people  are adding or changing, and if appropriate can add them to the  defaults. so let me know what changes you've made to your sorting /  grouping criteria.


i have been adding to my presets -a sort/group by disc entry, since i include the disc number in the info displayed in the group display, also it allows for displaying unique album art for the individual discs of a multi-disc album

foo_ui_panels

Reply #873
I still have one request. When hiding the titlebar click and dragging anywhere in the foobar window will move the window.
This destroys my alignment with my background. Could you make an option to turn of this easy move?

thx
Inter Deum et Diabolum semper Musica est", Tanzwut

foo_ui_panels

Reply #874
@Terrestrial:  regarding how I  would like to see some of these things work, ultimately...

1) I often group by codec.  It is more of a matter of avoiding multiple audio tracks in different formats, and for informational purpose (visual).  Things like that.  However, I am not really sure why it should be terribly important to have just the right default presets.  Anyone who takes the time and effort, can create a layout.

2) Following on that, I agree (I think) quite a bit with FofR, regarding... if not in the .pui file, then in another PanelsUI file, would be a nice place to keep the code for layouts, etc.  I made a few yesterday, and unfortunately my computer crashed without me having done the 'save all'.      But, it seems to me that aside from PanelsUI, the individual setups for SCPL, if kept in cfg/pui/ini/whatever... files, could be distributed separately from full configs, etc.  Also, maybe an 'auto-save' feature.      Actually, I feel that separate files for SCPL all alone, is best.

Thanks a LOT for all your efforts