Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-22-2012, 09:48 AM
Vatec Vatec is offline
Lurking
Join Date: Oct 2012
Posts: 27
Vatec is on a distinguished road
Easy way to check radio buttons...

Well it appears that because each radio button is it's own little box of code I can't find a way to check which button is selected without a lot of "if" statements, is there a better way to do this?
__________________


Quote:
Originally Posted by GULTHEX View Post
so i think the problem is that onactionclientside isint a real function
Reply With Quote
  #2  
Old 11-22-2012, 11:09 AM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
For example...

Graal Script Code:
new GuiRadioCtrl("Test_Radio1") {
  
profile GuiBlueRadioProfile;
  
10;
  
10;
  
width 100;
  
height 20;
  
groupnum 1;
  
text "Radio button 1";
  
  
thiso.catchevent(this"onAction""onRadioButtonChanged");  // Take note of this line

Then you can use the following to determine if it has been clicked or not:

Graal Script Code:
function onRadioButtonChanged(temp.object)
  
player.chat "Radio button '" temp.object.name "' clicked!"
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:03 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.