View Single Post
  #8  
Old 10-21-2010, 09:17 PM
Cubical Cubical is offline
Banned
Join Date: Feb 2007
Posts: 1,348
Cubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant futureCubical has a brilliant future
Quote:
Originally Posted by xXziroXx View Post
First of all, you can replace

PHP Code:
  for (temp.i = 0; temp.i < 42; temp.i++)
  {
    (@ 
"InventoryGuiBitmapCtrl_item_" @ temp.i).destroy();
  } 
with

PHP Code:
InventoryGuiScrollCtrl_Contents.clearControls(); 
You also don't have to use temp.w and temp.h to determine the positions of the controls. Instead you could use this:

PHP Code:
x = 33*(temp.i%4);
y = 33*int(temp.y/4); 
I'm also fairly sure that your text controls is what messes it up. Try commenting them out. Why aren't you just setting text = clientr.item.(@temp.itemlist[temp.i])[0]; in the GuiShowImgCtrl though?
I figured out what the problem was, I forgot I added a control in another WNPC. Anyways, thanks for the pointers especially the clearControls().
Reply With Quote