PDA

View Full Version : A few GUI Commands not working?


100Zero100
01-23-2014, 04:34 PM
I have a GUI system and ever since v6 went live I can't seem to get two things to work properly. I've tried basically everything I can think of, including isolated script testing. Are these just removed with v6?

1. The button.performClick(); function. Previously, I would bind a button locally to an edit box, so that when the player pressed "enter" it would catchEvent the editbox's onAction and then perform the this.relatedButton.performClick() functionality. However, now I cannot seem to get this to function, even when troubleshooting shows that the onAction catchevent is functioning properly. I've even tried simply straight-up defining a button by itself and then doing .performClick() on it, and it didn't work.

2. Are MLTEdits no longer able to have borders or backgrounds? It's a real nuisance.


I have implemented the following solutions, assuming these are actually broken:

1. Rather than doing this.relatedButton.performClick() on the button, I am simply calling the redirected catchEvent directly: buttonPressed(this.relatedButton);

2. I've taken to it by simply adding a control (for its borders/background) and then putting the MLTEdit inside of the control. It makes for some sloppy annoyances, but I've managed.

cbk1994
01-24-2014, 02:40 AM
performClick was removed in v6:

GuiButtonCtrl.performclick() doesn't seem to work
It has been removed a long time ago because of security issues.

iirc for #2 you need to wrap it in a GuiScrollCtrl, but not 100% sure on that