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 11-29-2009, 01:31 AM
OiRodgar OiRodgar is offline
Registered User
OiRodgar's Avatar
Join Date: Jan 2005
Posts: 23
OiRodgar is on a distinguished road
Need some help with GUIs

I need some help with GS2 again

After I scripted a little shop, I wanted to script a shop with a GUI.
I made a GUI but somehow the text in GuiMLTextCtrl won't change when I select something in GuiTextListCtrl.

Here is my script

PHP Code:
//#CLIENTSIDE
function onPlayertouchsme() {

  new 
GuiWindowCtrl("Shop_Window4") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "544,447";
    
visible true;
    
canmove true;
    
canresize false;
    
canmaximize false;
    
closequery false;
    
destroyonhide true;
    
text "Willkommen im Waffenshop";
    
29;
    
115;

    new 
GuiScrollCtrl("Shop_TextList1_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 426;
      
hscrollbar "alwaysOff";
      
vscrollbar "dynamic";
      
width 120;
      
9;
      
15;

      new 
GuiTextListCtrl("Shop_TextList1") {
        
profile GuiBlueTextListProfile;
        
height 426;
        
horizsizing "width";
        
width 99;

        
clearrows();
        
addrow(0,"Bombe");
        
addrow(1,"Bogen");
        
addrow(2,"Nukeshot");
        
addrow(3,"Fire Ball");
      }
    }
    new 
GuiScrollCtrl("Shop_MultiLine1_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 426;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 403;
      
138;
      
14;

      new 
GuiMLTextCtrl("Shop_MultiLine1") {
        
profile GuiBlueMLTextProfile;
        
height 16;
        
horizsizing "width";
        
text "<center><h1>Willkommen im Waffenshop!</h1><br> Hier erhalten sie eine Vielzahl an Mitteln um Ihre Gegner auszulöschen</center>";
        
width 378;
      }
    }
    new 
GuiButtonCtrl("Shop_Button1") {
      
profile GuiBlueButtonProfile;
      
text "Kaufen";
      
width 80;
      
286;
      
380;
    }
  }
}

function 
Shop_TextList1.onSelect(0,Bombe,1) {
Shop_MultiLine1.setText("Info Info Info");
}

function 
Shop_Button1.onAction() {
  
// Button "Kaufen" has been pressed

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 03:28 PM.


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