Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:58 PM.


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