View Single Post
Old 23rd November 2008, 19:29   #4
pjn123
Major Dude
 
pjn123's Avatar
 
Join Date: Jan 2006
Location: /\/¯¯¯¯¯\/\ , South-Africa
Posts: 1,030
@Michgelsen - Here on Opera when I edit and submit the changes dont show yet... have to refresh it again before it shows. Works on the SC forums so I guess its just a WaForum software problem.


@clementj
Anyway back to the problem.

Theres two ways:
- You can get the w/h via the .getWidth() or .getHeight() function. Please note that these 2 files will return the w/h of the object. This means that if you set the w/h manually in xml it will return this value instead of the auto w/h of the layer of you didnt specify anything. If the image change and you didnt change the w/h manually this also return the new image w/h. So can work very nice .
I used this back in the days where I was busy with Nullsoft Media Player 10.

- The other method and also the recommended one is that you get the value via a map. Here is an example of code:
PHP Code:
Map myMap = new Map;
myMap.loadMap("wasabi.list.background");
int myInt myMap.getWidth();
delete myMap
Just remember to delete the Map when your done! I didnt know this when I started using this method for Winamp-2006 and the memory usage will go up like mad on each read
The Map object also have other nice stuff (see std.mi)

ClassicPro© v2.01 : This plugin allows you to use cPro skins in Winamp. ClassicPro skins are all SUI skins and loads very quickly. ClassicPro skins is even easier to skin than Winamp Classic skins. A new layout have been added since version 2.
Download ClassicPro© ==== cPro Skins ==== ClassicPro© Homepage ==== SC Forums
pjn123 is offline   Reply With Quote