Help - Search - Members - Calendar
Full Version: alternating colours
Hydrogenaudio Forums > Hosted Forums > foobar2000 > General - (fb2k)
JEN
can anyone help me understand how to get alternating row colours in the playlist with foo_ui_columns?

Thanks
hedge153
QUOTE(JEN @ Feb 27 2005, 10:18 AM)
can anyone help me understand how to get alternating row colours in the playlist with foo_ui_columns?

Thanks
*


$if($strcmp($mod(%_playlist_number%,2),0),'first colour','second colour')

wink.gif
Sandman2012
This is from my global color setting on an alternating white and gray config:

CODE
000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),F4F4F4|$rgb(237,243,254),FFFFFF|$rgb(237,243,254))


...but, I reverse-engineered it from soneone else so I can't explain it fully without refering to the help file.
hedge153
QUOTE(Sandman2012 @ Feb 27 2005, 12:28 PM)
This is from my global color setting on an alternating white and gray config:

CODE
000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),F4F4F4|$rgb(237,243,254),FFFFFF|$rgb(237,243,254))


...but, I reverse-engineered it from soneone else so I can't explain it fully without refering to the help file.
*


Right, the $mod functions gives the remainder of the division of the playlist number by 2, which gives the results 0 or 1. In your code, if its 1 (greater then 0) then f4f4f4 is used, whereas if its not greater then 0 (= 0) then ffffff is used instead.
Sandman2012
That's what I said. tongue.gif



(thanks)
hedge153
QUOTE(Sandman2012 @ Feb 27 2005, 01:13 PM)
That's what I said. tongue.gif



(thanks)
*


hehe no probs, it took me quite a while to work out that mod function the first time i saw it wink.gif
JEN
Where do I add this code? I made some changes to it and I dont know it those changes are affecting it:
$if($strcmp($mod(%_playlist_number%,2),0),'$rgb(255,255,255)','$rgb(000,000,000)')
JEN
Oh I was adding that code with the existing code and it was giving me problems. I simply replaced the existing code and it worked.

I have 2 other questions

1. How do you change the font color of the track which is currently playing
2. how do you change the selected tracks font, so if I select about 10 tracks with the mouse I want those rows to have a different color?

Thanks
Andreasvb
This is mine

CODE
$if(%_isplaying%,FFFFFF|FFFFFF|FFC8FF|FFC8FF|FFAFE6||FFFFFF||FFFFFF||,FFFFFF|CD4B9F|E6AFFF|FFC8FF|FFAFE6||||||)



From Columns UI global help/string help:

Colour string: 9 colour codes in format: text|selected text|background|selected background|[selected background non-focus]|[left frame]|[top frame]|[right frame]|[bottom frame]
JEN
All I am trying to do is this:

display alternating colors for the rows in the playlist
display the font as a different color if it is playing
display the color 240,244,248 for the selected track or tracks

The first bit is already working using the following code

000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),F4F4F4|$rgb(237,243,254),FFFFFF|$rgb(237,243,254))

Andreasvb - i tried your code but dont know how to integrate it with the code about?

Thanks
JEN
Ok I made some progress. The following code gets 2 bits working

000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),F4F4F4|$rgb(240,244,248),FFFFFF|$rgb(240,244,248))

it now displays alternating row color and it displays the correct color when a row or rows are selected.

I cant seem to figure out how to change the color of the font which is playing?

Anyone know how to do this?
miscellanea
QUOTE(JEN @ Feb 27 2005, 09:07 PM)
I cant seem to figure out how to change the color of the font which is playing?
*



here's my old simple one :

CODE
$if(%_isplaying%,$rgb(0,0,255),$rgb(0,0,0))
JEN
That only seems to work when foobar2000 looses focus?

000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),$rgb(245,245,245)|$rgb(225,225,225),$rgb(255,255,255)|$rgb(230,230,230))
$if(%_isplaying%,$rgb(0,0,255),$rgb(0,0,0))

looks like im adding the last line in the wrong place sad.gif
miscellanea
QUOTE(JEN @ Feb 27 2005, 09:37 PM)
That only seems to work when foobar2000 looses focus?

000000|
000000|
$if($greater($mod(%_playlist_number%,2),0),$rgb(245,245,245)|$rgb(225,225,225),$rgb(255,255,255)|$rgb(230,230,230))
$if(%_isplaying%,$rgb(0,0,255),$rgb(0,0,0))

looks like im adding the last line in the wrong place  sad.gif
*



the last line should be put in first.
000000 -> $if(%_isplaying%,"playing colour","normal colour")

like this.
JEN
Thats it!

Thanks a lot biggrin.gif
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.