Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-16-2009, 11:39 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Post Guide: Naming GUI Controls

I've seen a lot of people doing this lately, and I wanted to let them know that it should be done differently in nearly all cases.

Rather than naming your GUI windows (and other controls) such as

Graal Script Code:
new GuiWindowCtrl("Window") {
  
// whatever

put part of the thing you're creating it in

Graal Script Code:
new GuiWindowCtrl("JailInformation_Window") {
 
// whatever

The reason this matters is because if you name your buttons things like "Button1" and "Close", which I've seen a lot of people doing, any script that has

Graal Script Code:
function Button1.onAction() {
  
triggerserver("gui"name"summonAllPlayers");

or any other function having to do with that button would be called, not just the script that created it.

Lesson's over, thanks for reading.
__________________
Reply With Quote
 

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 09:33 PM.


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