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: Track Info Panel with ability to change font (Read 729757 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track Info Panel with ability to change font

Reply #675
edit : More generaly, it would be useful to have "clickable" buttons in Trackinfo, for exemple if you display stars to chow your rating, you could make each star a button which would allow you to quickly set your rating. Or is it already possible ?

Yes, it's already possible. Just set buttons to use the 'TAG' command. There are examples of this all over in the appearance thread.

Yeah, I think that and the ability to control volume through Track Info Panel in the same way would be just perfect. I mean right now you can customize almost everything with columnUI, track info mod and single column... except for those two things (volume and seekbar) which look pretty ugly if you don't have a nice Visual Style.

You actually already can do volume through Track Info Panel. foobar includes volume commands (like 'Playback/Set volume to 0dB' and 'Playback/Volume up') out of the box, so it's only a matter of setting buttons to perform those actions. What foobar doesn't include is a method of retrieving the current volume level (which is necessary if you want to make a bar that fills up as the volume increases); however, cwbowron's foo_cwb_hooks component offers variables for this.

If you dig through the recent threads and find the 'Home Stereo Display' one you'll see how this is accomplished.
~

Track Info Panel with ability to change font

Reply #676
thanx a lot lav-chan! I overlooked the whole button thing in the wiki, looks like this plugin is far more complete (and complexe ^^; ) than I first thought.
I'll check foo_cwb_hooks the "stereo display" strings and see if I can get it to work the way I want =)

Track Info Panel with ability to change font

Reply #677
There would be a way, if there was a command to seek to a certain point in a given song. As far as i know, foobar only has commands to seek relative to the current position -- for example, 'Playback/Seek ahead by 1 minute'.


I suppose you could have a dynamically sized button that followed the seekbar, if your click to one side it seeked back by 10sec/1minute, on the other side forward. It wouldn't be perfect but it would be usable.

Track Info Panel with ability to change font

Reply #678
To that progressbar thingy...
I personnally think, that it would be easier to make the original progressbar skinnable (eg: choosing pic for the progress bg-line + pic for the dot thing), than making the whole thing up in the trackinfo_mod.
but then it would be on the to-do-list of the fb2k developers and I dunno if they are willingly to do that and have enough time...
fb2k on OSX: flac q8 > rockboxed Sansa e280v1: Vorbis q5.0

Track Info Panel with ability to change font

Reply #679
I would prefer a clickable/dragable progress/seek bar in trackinfomod as opposed to a separate toolbar component because then I can put it in the middle of a trackinfomod panel without adding the ugly splitter lines you get from columns ui. Also, I'd like to be able to do stuff like make vertical progress bars, circlular progress bars, progress bars that turn into other things on certain conditions... trackinfomod just opens up a whole level of flexibility you dont get with the traditional control.

I have already enjoyed migrating all my buttons to trackinfomod:

In the above example I could have made the bottom section of my layout from several button toolbars on a horizontal splitter and a custom statusbar but instead I have used a single trackinfomod panel. This allows me to move my playback controls to virtually any position I desire including halfway on top of my status bar. This also allows me to position controls based off of %_width% and %_height% so that they reposition effortlessly when switching from windowed to fullscreen mode.  This sort of flexibility just isnt there with the traditional controls. I also have an auto-hide trackinfo panel .. I would like to do things like change all my buttons to a seekbar when it unhides etc.  I would like to replace the dropdown main menu controls on the top with trackinfomod code so that I can change the code based on playback conditions.

Track Info Panel with ability to change font

Reply #680
New version uploaded

It might break some some code as leading tabs / spaces are removed to allow for more legible code

---------------------------------------------------------------------------


Or you can go the wiki. I've made a couple of updates today, hopefully it is now up to date. And while you are there, you can also take a look for some informations that I would have missed.


Thanks for keeping the wiki up to date 

its in there... most stuff automatically gets added to both components since they share a lot of the same source code.
Does that mean buttons will be implemented into the single column playlist code?


most stuff, not all...  I'm still thinking over whether to/the best way to add buttons to scpl.

As a side note, I'd just like to comment on terrestrial's awesome attitude towards bug reports and\or feature requests, as well as questions most developers find annoying (and i can understand those too, being one myself) like "when is the next version done".

It's nice to see such friendly and active developers in the community. Kudos


thanks  bug reports and well thought out feature requests are always nice.

1. I've set the default font to Verdana 7pt, but whenever I try to use a larger amount of pt (like 20 pt on the second line below //Track in the codebox) that line get's drawn but the other lines don't  See the screenshots.


your alignabs box isn't big enough to display the text.

Quote
2. Whenever I enable "Update every second" using the code below, CPU usage goes up to 14% (P4 2.4GHZ). I don't use a lot of code, i suspect it has to do with my code for the $imageabs2 functions but i can't seem to solve the problem. Do variables on lines that have been commented out still get evaluated? Because commenting out the line with $puts and $alignabs doesn't seem to do much, makes up for a difference of 1 or 2%. With the "Update every second" CPU usages simply is 0%.


try the new version and move your background images drawing to the "// Background" section.

Track Info Panel with ability to change font

Reply #681
Maybe i'm missing something,but it stopped updating every second with the new version:playback time is frozen
P.S. Thanx for the text editor!It rules!
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #682
put stuff that needs to update every second under "// PerSecond"

Track Info Panel with ability to change font

Reply #683
Sorry,i missed that part in the changelog.
One question can //Per second declaration be made number of times or is it defining one solid section of the code?
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #684
haven't tested it but you should be able to have multiple "// PerSecond" declarations. (note, it has to be exactly that, capitalization and all).

Track Info Panel with ability to change font

Reply #685
Any hope to have a: "//PerSempre"  (Italian for "forever")? 

I mean, having some system date and time keep showing and updating even if nothing is playing.

Thanks.

Track Info Panel with ability to change font

Reply #686
Any tips on how to make buttons work again?And also does //Per Second declaration affects all the lines that come after it until the next declaration,or is it only for the line under it?

Ok it goes as following:if you define the whole code as //Per Second,then everything works fine except for buttons,if you make no decaration,then the buttons work ok,but everything else is frozen.
Bottom line:? (what should i do?)
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #687
affects all the lines after.

buttons only work under "// PerTrack" (which is the default)

Track Info Panel with ability to change font

Reply #688
affects all the lines after.

buttons only work under "// PerTrack" (which is the default)

Yeah,figured that out already,another problem though:i have buttons that has no symbols displayed (empty fields),they placed on top of symbols that indicates their command output (for example on top of rating stars)
it worked fine in previous versions,but now when the button is hovered i get new background drawn on top of everything else.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #689
put the stuff over the button on // PerTrack also.

Track Info Panel with ability to change font

Reply #690
The stuff on top of the button is the overlay glass image,if i put it on //PerTrack mode,all other info is drawn over it and not beneath
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #691
Quote
+ different redraw times for different sections.
   // Background
      // Put background stuff here (eg images). Only drawn once.
   // PerTrack
      // Put stuff that changes per track here (%album%, %artist%, etc.) Buttons go here as well.
   // PerSecond
      // Stuff that needs to update every second (%playback_time%, etc)

So, for backwards compatibility we can just put a //PerSecond at the very beginning, and the other options are kinda just for resource management?
elevatorladylevitateme

Track Info Panel with ability to change font

Reply #692
Another bug:when in //PerTrack mode some buttons response only once per track play.
I have a button that circles the playback modes,it only works once per track now.
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #693
The stuff on top of the button is the overlay glass image,if i put it on //PerTrack mode,all other info is drawn over it and not beneath


for best performance you could break up the overlay image (I'm assuming the stuff over/under the button isn't updating every second).

however, for the next version, I will add the ability to have buttons in the // PerSecond section.


So, for backwards compatibility we can just put a //PerSecond at the very beginning, and the other options are kinda just for resource management?


pretty much, except for buttons which have to go under // PerTrack.

Another bug:when in //PerTrack mode some buttons response only once per track play.
I have a button that circles the playback modes,it only works once per track now.


I can't reproduce this... can you post a code snipped which shows this behavior?

Track Info Panel with ability to change font

Reply #694
Quote
I can't reproduce this... can you post a code snipped which shows this behavior?


Code: [Select]
$button2(72,21,0,0,13,12,,,
$if($stricmp(%cwb_playback_order%,'Shuffle (tracks)'),'Shuffle (albums)',
$if($stricmp(%cwb_playback_order%,'Shuffle (albums)'),'Shuffle (directories)',
'Shuffle (tracks)')),)
$alignabs(90,21,%_width%,%_height%,,)%cwb_playback_order%
Favourite artist:CD-R
Favourite album:700MB

Track Info Panel with ability to change font

Reply #695
It's noted in the wiki that %cwb_playback_order% (and one other variable, i forget which) won't update until a track is played. You think that might have something to do with it?
~

 

Track Info Panel with ability to change font

Reply #696
I use $puts and $get to store my font styles and some other stuff. I need to use $puts in both // PerTrack and // PerSecond to usse the variable in both sections. Is this intended?

Track Info Panel with ability to change font

Reply #697
Thanks again Terrestrial for these wonderful components.

I have a couple feature requests for the foo_trackinfo_mod:

* Follow cursor mode when not playing.  This is how the albumart component behaves, and I think it makes sense.

* Double-click function

* Not a feature request, but I notice that clicking on the panel doesn't give foobar focus from behind another window.

* Another non-request, but I get the same problem Russell does with buttons, where they put black rectangles over images.

Track Info Panel with ability to change font

Reply #698
I don't want to sound too critical but I do not like the idea of parsing comments as code. I don't like the idea of parsing rem statements in cue sheets for meta tags and I don't like using // comments in code to flag different sections.  Comments should be just that, comments. Perhaps there is a better approach to implementing these features, maybe a separate code box for each one? Maybe separate tabbed pages for each type in the config? I am hesitant to upgrade this component until all the button functionality is sorted out.

Track Info Panel with ability to change font

Reply #699
I don't want to sound too critical but I do not like the idea of parsing comments as code. I don't like the idea of parsing rem statements in cue sheets for meta tags and I don't like using // comments in code to flag different sections.  Comments should be just that, comments. Perhaps there is a better approach to implementing these features, maybe a separate code box for each one? Maybe separate tabbed pages for each type in the config? I am hesitant to upgrade this component until all the button functionality is sorted out.


Yeah, I partially agree with you. This commenting is kind of weird. I think the best solution would be to handle it like in SCP, a own box for every rendering type. Tabs would be nice, too.