![]() |
Triggering a gui control?
I have a GUI controll, his name is Jerry.
Say hi to jerry: PHP Code:
I need something along the lines of PHP Code:
Neight does Jerry.trigger("Action"); or any variation of that. Any solutions? (Note: I need this type of script, not other variations...I can't trigger DoStuff by itself, because I need information from inside that gui control. And in my actual script, I have a multitude of controls like Jerry, but they are dynamically generated. Which is why I need this particular script) |
You're already redirecting the event to DoStuff so just make DoStuff public and call it with:
findweapon("-WhereverItIs").DoStuff(Jerry); You actually don't have to pass Jerry at all but that would mimic the same params as it would receive normally. |
Well, I have different types of gui controls.
Some of which have different functions...which is why I was hoping I could trigger the gui control itself. Because one might trigger 'DoStuff' while the other could trigger 'DoOtherStuff'. Which is why I was hoping for something along the lines of triggering the gui control....would make like much easier. Edit: I solved the problem by just using a dynamic function, and storing the function that the gui should trigger within the gui control itself. :P |
Well just make a central function that they all use and call the right function based on the object passed.
Usage: findweapon("-GUI").triggerGUI(Jerry); PHP Code:
|
All times are GMT +2. The time now is 01:25 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.