Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-22-2012, 10: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, 12:09 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
For example...

PHP 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:

PHP Code:
function onRadioButtonChanged(temp.object)
  
player.chat "Radio button '" temp.object.name "' clicked!"
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
Reply


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 02:44 AM.


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