Help - Search - Members - Calendar
Full Version: Pictures won't stay in position when resizing the window
Hydrogenaudio Forums > Hosted Forums > foobar2000 > 3rd Party Plugins - (fb2k)
morphguy12
Hey guys, first post here and I'm trying to edit my own foobar trackinfo config.

CODE:
$if(%isplaying%,

$if($fileexists($replace(covers\%artist% - %album%.jpg,?,)),
$imageabs2(302,302,,,,,$sub($div(%_width%,2),151),$sub($div(%_height%,2),201),dark1\albumborder.png,NOKEEPASPECT)
$imageabs2(300,300,,,,,$sub($div(%_width%,2),150),$sub($div(%_height%,2),200),$replace(covers\%artist% - %album%.jpg,?,),NOKEEPASPECT)
$imageabs2($add($div(%_width%,3),2),$add($div(%_width%,3),2),,,,,$sub($div(%_width%,2),$add($div(%_width%,6),1)),$sub($div(%_height%,2),201),dark1\albumborder.png,NOKEEPASPECT)
$imageabs2($div(%_width%,3),$div(%_width%,3),,,,,$sub($div(%_width%,2),$div(%_width%,6)),$sub($div(%_height%,2),200),$replace(covers\%artist% - %album%.jpg,?,),NOKEEPASPECT)
,$if($fileexists($replace(%path%,%filename_ext%,)folder.jpg),
$imageabs2(468,362,0,0,468,422,435,$add(244,$get(addy)),dark1\cd.png, NOKEEPASPECT)
$imageabs2(336,310,0,0,448,422,445,$add(265,$get(addy)),dark1\cdcase.png,NOKEEPASPECT)
$imageabs2(302,302,,,,,$sub($div(%_width%,2),151),$sub($div(%_height%,2),201),dark1\albumborder.png,NOKEEPASPECT)
$imageabs2(300,300,,,,,$sub($div(%_width%,2),150),$sub($div(%_height%,2),200),$replace(%path%,%filename_ext%,)folder.jpg,NOKEEPASPECT)

I Have it setup perfectly on my monitor, but when I resize the window, the cd & cd case are still in one spot.

Could someone help me out real quick.

Thanks, much appreciated!
Yotsuya
Can you be more specific about what you mean by "still in one spot" ? Maybe take a screenshot or draw a picture?

The 3rd and 4th $imageabs2() functions are dynamically sized based off the panel width, while all the other $imageabs2() functions are explicity sized to common dimensions. This is bound to cause issues when resizing the window as not all images will be resized the same.
morphguy12
thanks yotsuya for the fast reply, much appreciated

Yea I got the config file from on here, which was already made, and was trying to add to it, which are the images that are messed up of course, lol

How would I go about making those dynamically sized based off of the panel width?

$imageabs2(468,362,0,0,468,422,435,$add(244,$get(addy)),dark1\cd.png, NOKEEPASPECT)
$imageabs2(336,310,0,0,448,422,445,$add(265,$get(addy)),dark1\cdcase.png,NOKEEPASPECT)

these are the ones that aren't dynamic
Yotsuya
It's rather difficult to give you good code without much to work with, however you might want to try playing with these lines of code I came up with wild guessing at what you have posted so far:
CODE
$imageabs2(468,362,,,,,$sub($div(%_width%,2),151),$add($div(%_height%,2),$get(addy)),dark1\cd.png, NOKEEPASPECT)
$imageabs2(336,310,,,,,$sub($div(%_width%,2),150),$add($div(%_height%,2),$get(addy)),dark1\cdcase.png,NOKEEPASPECT)
morphguy12
thanks yotsuya,.. is there a limit on how much you can add to your trackinfo.txt, cause my progress bar stuff is getting erased when I add all of this stuff
Yotsuya
If there is a limit I have not encountered it, I have a trackinfomod panel with 166 lines of code and it edits fine. I suppose you could always copy/paste the code directly into the codebox in the trackinfomod settings dialog.
morphguy12
where is the .txt file saved instead of editing in the codebox, which I am doing?

thanks for all your help?
NVM, I used to EDIT or open the txt file everytime, but now its easier without doing that, and it works
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.