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 730255 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Track Info Panel with ability to change font

Reply #1050
I want two buttons for control playback's order.

With default order:
$button(,,,,,,,,default,)

and work very well, but with shuffle (tracks) (or another shuffle mode) non:

$button(,,,,,,,,Shuffle(tracks),)
I have posted this before but the search function on this forum is next to worthless, I couldnt even find it. So here we go again, this is a basic example of how to make buttons for all of the playback modes:
Code: [Select]
$button2(0,0,0,0,%_width%,15,'Default','DEFAULT','Default',)
$button2(0,15,0,0,%_width%,15,'Repeat $char(40)Playlist$char(41)','REPEAT $char(40)PLAYLIST$char(41)','Repeat (playlist)',)
$button2(0,30,0,0,%_width%,15,'Repeat $char(40)Track$char(41)','REPEAT $char(40)TRACK$char(41)','Repeat (track)',)
$button2(0,45,0,0,%_width%,15,'Shuffle $char(40)Albums$char(41)','SHUFFLE $char(40)ALBUMS$char(41)','Shuffle (albums)',)
$button2(0,60,0,0,%_width%,15,'Shuffle $char(40)Directories$char(41)','SHUFFLE $char(40)DIRECTORIES$char(41)','Shuffle (directories)',)
$button2(0,75,0,0,%_width%,15,'Shuffle $char(40)Tracks$char(41)','SHUFFLE $char(40)TRACKS$char(41)','Shuffle (tracks)',)

Track Info Panel with ability to change font

Reply #1051
I want two buttons for control playback's order.

With default order:
$button(,,,,,,,,default,)

and work very well, but with shuffle (tracks) (or another shuffle mode) non:

$button(,,,,,,,,Shuffle(tracks),)
I have posted this before but the search function on this forum is next to worthless, I couldnt even find it. So here we go again, this is a basic example of how to make buttons for all of the playback modes:
Code: [Select]
$button2(0,0,0,0,%_width%,15,'Default','DEFAULT','Default',)
$button2(0,15,0,0,%_width%,15,'Repeat $char(40)Playlist$char(41)','REPEAT $char(40)PLAYLIST$char(41)','Repeat (playlist)',)
$button2(0,30,0,0,%_width%,15,'Repeat $char(40)Track$char(41)','REPEAT $char(40)TRACK$char(41)','Repeat (track)',)
$button2(0,45,0,0,%_width%,15,'Shuffle $char(40)Albums$char(41)','SHUFFLE $char(40)ALBUMS$char(41)','Shuffle (albums)',)
$button2(0,60,0,0,%_width%,15,'Shuffle $char(40)Directories$char(41)','SHUFFLE $char(40)DIRECTORIES$char(41)','Shuffle (directories)',)
$button2(0,75,0,0,%_width%,15,'Shuffle $char(40)Tracks$char(41)','SHUFFLE $char(40)TRACKS$char(41)','Shuffle (tracks)',)

oh thanks!!

I must write Shuffle (tracks) with '' : 'Shuffle (tracks)'

Now work very fine

Thanks...!!

Track Info Panel with ability to change font

Reply #1052
I'm having problem with some code I have here:

Code: [Select]
//REPLAY GAIN//
$puts(rpg,
$if(%__replaygain_track_gain%,   TGain: $rgb(77,122,172)$cut(%__replaygain_track_gain%,5)' dB',$rgb(78,78,78)       '['$button2(300,1,0,0,150,16,'$font(tahoma,8,underline,61-131-182)No TGain','$font(tahoma,8,underline italics,120-145-209)No TGain',Scan Per-file Track Gain,)']'))
$alignabs(400,1,95,16,,)
$get(rpg)
//REPLAY GAIN//


I'm not sure why you are caching the code snippet into a string variable only to extract it out again later. I am not familiar with that technique and not sure why you would that. That being said, I don't think wrapping the $font() call in single quotes will work in this scenario, try moving the single quotes on the $font() calls to the end of the call.

Track Info Panel with ability to change font

Reply #1053
Thanks for the reply, but that wasn't part of the problem . I'm not to sure what was, but I decided I'd make the code over from scratch. So now I have the following, and it works perfectly .

Code: [Select]
//REPLAY GAIN//
$alignabs(400,1,100,16,,)
$if(%__replaygain_track_gain%,   TGain: $rgb(77,122,172)$cut(%__replaygain_track_gain%,5)' dB',$alignabs(420,1,100,16,,)'['               ']'$button2(425,1,0,0,50,16,'$font(tahoma,8,underline,126-126-126)No TGain','$font(tahoma,8,underline,126-126-126)No TGain',Scan Per-file Track Gain,))
//REPLAY GAIN//
Song List: keikoniumboards.ke.funpic.org/files/songlist.html

Track Info Panel with ability to change font

Reply #1054
I read, that the author removed the functionality, that a line starts scrolling if its wider than the line it is placed in is. Is it possible to do this via a workaround ? because this is very important for me !

thank you very much, elemakil

Track Info Panel with ability to change font

Reply #1055
I have a little feature request. I was wondering if like NOKEEPASPECT we could have a REPEAT option for images. This would b just awesome to draw background.

Track Info Panel with ability to change font

Reply #1056
I need more code help...

I have made a custom status bar, and need a bit of help. Here is the code first of all:

Code: [Select]
// PerSecond
// Global
$puts(rating,$if2(%rating%,0))
$puts(ratedir,images\rating_stars\)
$puts(ratedir2,images\rating_hearts\)
$puts(X,1090)
$puts(Y,1)
$puts(spacer_symb,' ')
$puts(spacer_width,2)
$puts(spacer,$repeat($get(spacer_symb),$get(spacer_width)))
$puts(text_time_remaining,$rgb(153,57,146)[%_time_remaining%])
$puts(numitems,%cwb_activelist_count%)
$puts(RC1,$rgb(245,255,53,245,255,53))
$puts(RC2,$rgb(64,67,12,64,67,12))
$puts(RC3,$rgb(60,221,68,60,221,68))
$puts(RC4,$rgb(223,0,5,223,0,5))

// Background
$imageabs(0,0,\images\statusbg.png,)


// PerTrack

//DIRECTORY LINKS//
$alignabs(775,1,35,16,,)
$font(Calibri,9,,221-222-223)Open: $button2(810,1,0,0,44,16,'$font(tahoma,8,underline,61-131-182)Directory','$font(tahoma,8,underline italics,120-145-209)Directory',Open Directory,)
$alignabs(854,1,45,26,,)
$font(Calibri,9,,221-222-223)'|'$button2(860,2,0,0,10,16,'$font(Wingdings 3,8,underline,61-131-182)Q','$font(Wingdings 3,8,underline italics,120-145-209)Q',Update all,)
//DIRECTORY LINKS//

//REPLAY GAIN//
$alignabs(400,1,100,16,,)
$if(%__replaygain_track_gain%,  TGain: $rgb(77,122,172)$cut(%__replaygain_track_gain%,5)' dB',$alignabs(420,1,100,16,,)'['              ']'$button2(425,1,0,0,50,16,'$font(tahoma,8,underline,126-126-126)No TGain','$font(tahoma,8,underline,126-126-126)No TGain',Scan Per-file Track Gain,))
//REPLAY GAIN//

// PerSecond

//PROGRESS BAR//
$puts(pbw,300)
$padding(4,0)
$align(left,)
$font(Calibri,9,,221-222-223)
[%_time_elapsed%]

$drawrect($muldiv(%_width%,8,$get(pbw)),3,$muldiv(%_width%,81,$get(pbw)),9,brushcolor-null pencolor-223-0-5)
$drawrect($add($muldiv(%_width%,8,$get(pbw)),2),5,$ifgreater($muldiv($sub($muldiv(%_width%,81,$get(pbw)),4),%playback_time_seconds%,%length_seconds%),0,$muldiv($sub($muldiv(%_width%,81,$get(pbw)),4),%playback_time_seconds%,%length_seconds%),1),5,brushcolor-188-54-57 pencolor-null)

$alignabs(350,1,30,16,,)
$font(Calibri,9,,221-222-223)
[%length%]

$alignabs(373,1,40,16,,)
$puts(progress_%,
$if(%_time_total_seconds%,' '$rgb(49,130,81)$pad_right($muldiv(%_time_elapsed_seconds%,100,%_time_total_seconds%),3)$rgb(49,130,81)'%'' '))
$get(progress_%)
//PROGRESS BAR//

//REMAINING TIME//
$alignabs(500,1,130,16,,)
Remaining Time: $get(text_time_remaining)
$get(time)
//REMAINING TIME//

//NUMBER OF TOTAL SONGS//
$alignabs(635,1,140,16,,)
Total Songs: $rgb(158,146,75)$get(numitems) Songs
//NUMBER OF TOTAL SONGS//

//LAST PLAYED//
$alignabs(890,1,250,16,,)
Last Played: $if(%last_played%,$puts(diff,$cwb_datediff(%last_played%,%cwb_systemdate%))$ifgreater(1,$get(diff),$rgb(206,147,102)Played Today,$ifgreater(2,$get(diff),$rgb(188,140,92)Yesterday,$rgb(183,113,66)$get(diff) Days Ago)),$rgb(152,83,50)Never)
//LAST PLAYED//

//LYRICS AND ALBUM ART//
$alignabs(1050,-4,250,20,,)
$if(%LYRICS%,$font(Arial Unicode MS,12,,80-218-90)♬,$font(Arial Unicode MS,12,,42-42-42)♬)
$if($cwb_fileexists(C:\Song Album Covers\%album%.png),$font(Wingdings 2,12,,80-218-90)8,$font(Wingdings 2,12,,42-42-42)8)
//LYRICS AND ALBUM ART//

//RATING STARS//
$alignabs(1090,-1,150,16,,)
$font(Arial Unicode MS,9,,)
$if($greater(%play_counter%,99), $get(RC4)~❤~$get(RC2),
$if($greater(%play_counter%,49), $get(RC3)✓✓✓✓✓✓$get(RC2),
$if($greater(%play_counter%,24), $get(RC1)★★★★★$get(RC2),
$if($greater(%play_counter%,19), $get(RC1)★★★★$get(RC2)★,
$if($greater(%play_counter%,14), $get(RC1)★★★$get(RC2)★★,
$if($greater(%play_counter%,9), $get(RC1)★★$get(RC2)★★★,
$if($greater(%play_counter%,4), $get(RC1)★$get(RC2)★★★★,
$if(%play_counter%,) $get(RC2)★★★★★)))))))
//RATING STARS//

(There are some unicode characters in there, so you may see boxes near the end).

Anyways, the code works perfectly for what I need it to do. I just wanted to "enhance" it a little bit. I wanted to "wrap" the code into something so that when I have my foobar paused (%is_paused% works right?) the word "PAUSED" is in the center, and red with none of the other stuff showing. And when there is no song playing (%is_playing% might work) the words "NO SONG PLAYING" are displayed in the middle.

Could someone help me with this?

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

Track Info Panel with ability to change font

Reply #1057
Keikonium: Basically you'll need to do something like this..
Code: [Select]
$if(%_isplaying%,
$if(%_ispaused%,
$align(center,middle)$font(,,,255-0-0)PAUSED,
'[Your Existing Code Here]'
),
$align(center,middle)$font(,,,255-0-0)NO SONG PLAYING
)

I made an attempt to rewrite the code you pasted however you have some strange issues going on with your refresh tags // PerSecond, // Global, // PerTrack, etc. You might want to take some time and clean that up.

Track Info Panel with ability to change font

Reply #1058
Can I use PVAR to set a variable as a statement by itself? or must it be a button command?

Track Info Panel with ability to change font

Reply #1059
$setpvar(variable name,value)
elevatorladylevitateme

Track Info Panel with ability to change font

Reply #1060
Thanks.

Track Info Panel with ability to change font

Reply #1061
Still looking for solution for my problem about how to find out the height of a multiline string. Any help appreciated.

Track Info Panel with ability to change font

Reply #1062
orchid:
Have you tried playing around with something like this?
$mul($div($calcwidth(%string%),%_width%),$calcheight(%string%))
though it will probably fail because of wordwrapping. I really wish there was a way to disable wordwrapping. Also did you want the height in pixels or number of lines?

Track Info Panel with ability to change font

Reply #1063
Guys, I need a hand. Please.

I have a Trackinfo code for the old Trackinfo plugin (that is, the "no-mod" trackinfo) and I'm having problems adapting it to Terrestrial's trackinfo_mod.

Here is the code:

Code: [Select]
// Rash modified for Dark (Purple) Azrael Theme
// Font: Lucida Sans Unicode 8pt

f04a78Mode: %_trackinfo_mode%$char(10)$if(%_trackinfo_notrack%,No track,
$char(1)C0500d9Song Info$char(10)
f04a78Title: ffffff%title%$char(10)
f04a78Artist: F3EAE0%artist%$char(10)
f04a78Album: F3EAE0%album%$char(10)
f04a78Date: F3EAE0%date%)$char(10)
f04a78Genre: F3EAE0%genre%$char(10)
$char(1)C0500d9Tech Info$char(10)
f04a78Codec: F3EAE0%__codec% $char(10)
f04a78Bitrate: F3EAE0%__bitrate% Kbit/s$char(10)
f04a78Samplerate: F3EAE0%__samplerate% Hz$char(10)
f04a78Channels: F3EAE0$if(%__channels%,$ifgreater(%__channels%,2,%__channels%ch,$ifgreater(%__channels%,1,' 'Stereo,''Mono)),)$char(10)
f04a78Time: F3EAE0%_time_elapsed% / %_time_total%$char(10)

$puts(theme,1)

// progressbar config
$puts(progress_char,█)
$puts(progress_length,10)

$if($strcmp($get(theme),1),
$puts(progress_color1,$rgb(217,0,0))
// alt: 120,74,240
$puts(progress_color2,$rgb(63,63,63))
)


// PREPARE COLOR-STRINGS
// =========================================
$puts(progress_color1a,$blend($get(progress_color1),000000,1,4.5))
$puts(progress_color2a,$blend($get(progress_color2),000000,1,5.7))

// progressbar
$puts(progressbar,
$if(%_length_seconds%,

$puts(progress,$muldiv(%_time_elapsed_seconds%,$get(progress_length),%_length_seconds%))
$transition($repeat($get(progress_char),$get(progress)),$get(progress_color1a),$get(progress_color1))
$transition($repeat($get(progress_char),$sub($get(progress_length),$get(progress))),$get(progress_color2a),$get(progress_color2))
$pad_right($muldiv(%_time_elapsed_seconds%,100,%_length_seconds%),4)'%'
,streaming...
)
)
$get(progressbar)

I think I know how to convert the color information to $rgb(#,#,#), all I have to do is convert the hexadecimal number to decimal. That will give me a hard time, but that's OK. (Note: this old color information still works on Terrestrial's mod) Now, my trackinfo doesn't refresh by itself. I have the track play time on it and it doesn't update. If I make any modifications or if I simply click on settings then the trackinfo updates only once, correctly, but not anymore. The old trackinfo component allowed me to set a refresh time, trackinfo_mod doesn't. Could you guys help me adapt the new code? This is my first step towards my own PanelsUI customization. Thank you very much.
Liberate tutemae ex inferis

Track Info Panel with ability to change font

Reply #1064
Try adding '// Per Second' as the first line, Either with or without the space, I can't remember.

Track Info Panel with ability to change font

Reply #1065
i am trying to show the time elapsed and the total length of the track. I am using the code below, but the time elapsed does not update. is there something wrong with the code? or some other way to handle this?

Code: [Select]
 // Per Second
$if(%_isplaying%,%_time_elapsed% ' / ')%length%


thanks

Track Info Panel with ability to change font

Reply #1066
Code: [Select]
// PerSecond
$if(%_isplaying%,%_time_elapsed% ' / ')%length%


This works for me. Thats why i said, Try without the space.

Track Info Panel with ability to change font

Reply #1067
i have tried with and without spaces. no luck.

how can i tell if i have the latest version of the plugin? maybe that is the problem?

Track Info Panel with ability to change font

Reply #1068
Maybe, try updating. I know i pasted your code into my panel, changed it to // PerSecond and the time updated fine for me.

Track Info Panel with ability to change font

Reply #1069
If your trackinfomod component is too old to support // PerSecond then there should be a checkbox in the config for update every second. Also, this component is no longer being maintained as a separate component and is now part of Panels UI.

Track Info Panel with ability to change font

Reply #1070
Heh, Even i didn't know that.

Time for converting, I guess. Is PanelsUI stable enough already?

Track Info Panel with ability to change font

Reply #1071
i had a space between Per and Second. that is what was messing me up.

is working fine now.

thanks!

Track Info Panel with ability to change font

Reply #1072
The new functionality of PanelsUI is only enabled if you change your display to use it instead of ColumnsUI.  Otherwise, Track Display and SCPL are basically unchanged from the previously separate versions, and function well.  Oh yeah, the trackinfo panel's name was changed to Track Display.

Track Info Panel with ability to change font

Reply #1073
Is there anyway to have a button stay in the mouse over form when clicked?
Alternatively, is there a way to tell what the playback order is?

I'm trying to make a button for shuffle and repeat that stay a different color when they are active but havent figured it out. Any help would be great, thanks.

Track Info Panel with ability to change font

Reply #1074
Hi all,

I'm using a button to open Album list window. But it always opens over main foobar window
Code: [Select]
$button(291,1,0,0,22,21,/images\LE5\search.png,/images\LE5\search_.png,Album List,)


Is there any possibility to choose window position in button command?