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 07-23-2008, 06:43 AM
LoneAngelIbesu LoneAngelIbesu is offline
master of infinite loops
LoneAngelIbesu's Avatar
Join Date: May 2007
Location: Toldeo, Ohio
Posts: 1,049
LoneAngelIbesu has a spectacular aura aboutLoneAngelIbesu has a spectacular aura about
Send a message via AIM to LoneAngelIbesu
GuiTextCtrl inside of GuiTextListEntry?

While creating (or at least trying to ) the trading system for Valikorlia, I realized that I wasn't accounting for duplicate items. So, I had the idea of having a text control at the bottom right-hand corner of the item's icon. However, I haven't had much luck.

I've tried creating a GuiTextCtrl inside the GuiTextListEntry, but it doesn't work. I've also tried creating it outside of the GuiTextListEntry, and it still doesn't work. Each time I try to create a GuiTextCtrl inside of this particular loop, it breaks and no rows are added at all.

Below is the chunk of code I'm dealing with. Note that temp.i is declared at the start of the function.
PHP Code:
    new GuiScrollCtrl("Trade_Inventory_Scroll") {
      
profile GuiScrollProfile;
      
height 225;
      
hscrollbar "alwaysOff";
      
vscrollbar "dynamic";
      
width 165;

      new 
GuiTextListCtrl("Trade_Inventory") {
        
profile GuiTextListProfile;
        
height 32;
        
horizsizing "width";
        
seticonsize(32,32);
        for(
0thiso.archlist.size(); i++) {
          if(
thiso.archlist[i][0] == "gold") {
            continue;
          }
          
with(addrow(ithiso.archlist[i][3])) {
            
this.archname thiso.archlist[i][0];
            
this.iconimg thiso.archlist[i][1];
            
this.value thiso.archlist[i][2];
            
this.name_sl thiso.archlist[i][3];
            
this.name_pl thiso.archlist[i][4];
            
this.count thiso.archlist[i][5];
            
this.icon.drawimage(00this.iconimg);
            
this.hint "Value: " this.value;
          }
          
/*
            -- Trying to add it outside of the addrow()
               does not work. Neither does adding it
               inside of the addrow().
               
          new GuiTextCtrl("Trade_" @ thiso.archlist[i][0]  @ "_Count") {
            profile = GuiInventoryItemTextProfile;
            x = Trade_Inventory.rows[i].x + 15;
            y = Trade_Inventory.rows[i].y + 15;
            text = "x" @ thiso.archlist[i][5];
          }*/
        
}
      }
    } 
__________________
"We are all in the gutter, but some of us are looking at the stars."
— Oscar Wilde, Lady Windermere's Fan
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 07:14 PM.


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