Adding current song display. Thread last updated on 2005-07-25 02:53:39

Posted by member 177445 on 2005-07-24 18:26:33

I am currently using this theme:

http://www.litestep.net/index.php?section=2&action=details&id=950

As you can see, it has a box for the winamp controls that doesnt have a Current Song display. I would like to add one but have no idea how I would go about doing that. I know very little about litestep coding but I did manage to add my own taskbar and clock to this theme, so I'm not completely in the dark.

Thanks in advance.

Posted by member 1 on 2005-07-24 18:35:45 link

There are a couple different modules to get you where you want to be. Take a look around in the Audio Modules section and find something that is right for you.

Posted by member 177445 on 2005-07-24 19:28:42 link

Well the theme I'm using is currently using Dynamp. It doesn't seem possible to do what I want with Dynamp, unfortunately.

Posted by member 212670 on 2005-07-24 19:31:58 link

xlabel! (newest ver is 3.4.1)
*Label amptext
amptextX 0
amptextY -20
amptextWidth 158
amptextHeight 20
amptextSolidColors EEEEEE FFFFFF 000000
amptextSolidBevelSize 1
amptextScroll true
amptextScrollSpeed 2
amptextBorders 2 2 0 0
amptextText "Playing: [winampsong]"
amptextFontAlign center

The above is a basic setup and will display just the song. See the xlabel readme for more details.

Posted by member 177445 on 2005-07-24 20:16:14 link

Okay. So the theme I'm using is utilizing the LsBox module to make the little stand-alone winamp box. The coding for it is as follows:

LsBoxName sound
LsBoxX 135
LsBoxY 684
LsBoxHeight 58
LsBoxWidth 127
LsBoxBackGround $LSImageFolder$box_sound.png
LsBoxRememberPosition "1"
LsBoxZOrder HUGBOTTOM
LSBoxDragRect 0 0 199 27

*ModuleHook !SliderHook "Volume" 9 24 3 slider.png sliderb.png HI [VOLUME] 1
*ModuleHook !LabelLsBoxHook foopowerLabel
*ModuleHook !LabelLsBoxHook fooplayLabel
*ModuleHook !LabelLsBoxHook foopauseLabel
*ModuleHook !LabelLsBoxHook fooprevLabel
*ModuleHook !LabelLsBoxHook foonextLabel


Is there any way to add the xlabel code to the box?

Posted by member 12025 on 2005-07-24 20:29:47 link

No, you add the code to another file. Once it is good enough, you then add another *ModuleHook line in LsBox (like other labels there have).

Note that when hooking, the x and y positions are based on the parent (the LsBox in this case), not the screen resolution.

Posted by member 177445 on 2005-07-24 21:54:54 link

Ok, I created the seperate file called song.rc which works fine when I load it. However, I'm not to sure on what the context would be to add it to the LsBox. I don't really understand the *ModuleHook's and what not.

Posted by member 212670 on 2005-07-24 22:20:50 link

I've never used lsbox before, so this is off the top of my head. The .box file you have listed there will probably need to be made bigger. So, I'd first do something along the lines of changing the Height from 58 to about 78. That will give you a bigger box (heh heh heh - sorry, juvenile sense of humor :D). Then, add to the .box file
*ModuleHook !LabelLsBoxHook amptext
(amptext being whatever the name of the label is). Then, back in the file with the amptext settings (song.rc?) you'll need to adjust the x and y coords relative to the inside of the box. You may need to move the other elements down (adjust their Y coord in their respective files) if you want the amptext on the top. If you increase the box size by say 20, then the other elements would move down by 20 (add 20 to their Y coords), and the amptext would have a Y coord of 0... which would put it smack at the top. Just make sure to backup files before you start going nuts, and then don't be scared to experiment.

Posted by member 177445 on 2005-07-24 22:59:28 link

Thank you! It worked. One small problem though. The song displays perfectly in the box as it should. However, the song also displays on the desktop for some reason. I only told it to display in the box yet it still loads on the desktop as well. I have no idea why it is doing this.

Posted by member 12025 on 2005-07-24 23:03:28 link

Do you have a *label line in there for it?
If you have *(hookline) !LabelLsBoxHook amptext, you should NOT have *label amptext.

Posted by member 177445 on 2005-07-24 23:26:34 link

Wow. That was an easy fix. I'd like to thank all you guys for your help.

I'm sure I'll be back for more help at some point.

Posted by member 212670 on 2005-07-25 00:12:22 link

Another satisfied customer.

Posted by member 177445 on 2005-07-25 00:26:14 link

I might as well post this in here as it's still fresh...

Is there any way to remove the gap left by hiding the icons in the taskbar?

Posted by member 212670 on 2005-07-25 02:06:39 link

Hmm do you mean the text border where the icons used to be? Depends on the taskbar module, but look for something along the lines of xTaskbarFontLeftBorder or TaskbarButtonFontBorder. Something you may want to do, aswell, is look in the theme.rc and see which taskbar module is being loaded, and check out the readme file (\LiteStep\modules\docs or look in the right click menu). I'm not saying RTFM (atleast not in that way :D), but there you will find a lot of useful info (same for any module).

Posted by member 177445 on 2005-07-25 02:53:39 link

That did it. Thanks again.