Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Checking image width/height (https://forums.graalonline.com/forums/showthread.php?t=68159)

cbk1994 08-17-2006 04:09 PM

Checking image width/height
 
I'm making a Q Menu, which works, except I'd like to have all icons centered if they're less than 32 x 32.
What's the variable called for imgwidth and imgheight. Several things i tried where:
i = findImg(200);
player.chat = i.imgwidth SPC i.width; // And that returned 0 0 in player.chat

Any help is much appreciated. Thanks.
Chris

contiga 08-17-2006 07:49 PM

Quote:

Originally Posted by cbkbud
I'm making a Q Menu, which works, except I'd like to have all icons centered if they're less than 32 x 32.
What's the variable called for imgwidth and imgheight. Several things i tried where:
i = findImg(200);
player.chat = i.imgwidth SPC i.width; // And that returned 0 0 in player.chat

Any help is much appreciated. Thanks.
Chris

PHP Code:

findImg200);
i.image "something.png";
temp.img_w getimgwidthi.image);
temp.img_h getimgheighti.image); 


Omini 08-18-2006 12:46 AM

If you're using a GuiShowImgCtrl("Name") then it's Name.width and Name.height... has to come after that GuiShowImgCtrl though.


All times are GMT +2. The time now is 02:43 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.