View Single Post
  #1  
Old 01-04-2011, 05:42 PM
Toxen Toxen is offline
A Toxic Fellow
Join Date: Jan 2008
Location: Georgia
Posts: 36
Toxen is on a distinguished road
Post Array of Gui Buttons.

Hi, I am currently trying to make a GUI based inventory system, and for some reason using a loop will not work.

i is the column count I could say, after 8 it should become 0 and j which is the row number should be added to 1.

Anyone have any ideas?

PHP Code:
     this.count 0;
     
this.0;
     
this.0;
      while (
this.count this.weplist.size) {//weplist.size does have a value
        
new GuiButtonCtrl("inv_obj_" this.count) {
          
profile GuiBlueButtonProfile;         
          
*((parent.width-20)/8); 
          
*((parent.height-20) / ( int(this.weplist.size) ) );  
          
width = ((parent.width-40)/8);
          
height = ((parent.width-40)/8);
          
text this.weplist[this.count];
        }
         
this.count++;
         
this.i++;
         if (
this.i>8) {//I put 8 Items on each row so after it adds to row#
          
this.j++;
         
this.i=0;
        }
        
       } 
__________________
UN NAT.
Reply With Quote