![]() |
Close GUI on button click?
Hi,
I want my GUI to close when the player presses a button... Here are the two parts of my GUI Script about the button I want to close the whole GUI: HTML Code:
new GuiButtonCtrl("ClassSelect_Button3") {HTML Code:
function ClassSelect_Button3.onAction() {Please help, all I need is the command to close everything and where to put it, thanks :) |
i'm fairly sure it's
PHP Code:
|
Oh yeah it worked!
I was doing ClassSelect.destroy(); but it was actually ClassSelect_Main.destroy(); like you said Thanks :) |
If it's a GUI that will be used fairly often, or even not that often, it's better to just .hide() it rather than constantly recreating it every time it's needed. I've asked about this and Stefan has confirmed that create/destroy should only be reserved for single-use GUI's.
|
| All times are GMT +2. The time now is 09:27 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.