Vice City: Multiplayer

VC:MP Discussion => Support => Topic started by: Dagger on Apr 23, 2017, 08:13 AM

Title: GUI Button
Post by: Dagger on Apr 23, 2017, 08:13 AM
Hello VCMP COmmunity!

I need a little help with the GUI feature
Lets say i have created a gui window and gui button and added gui button as child to the window
and when i add the flag GUI_FLAG_VISIBLE the gui is visible , but when i want to close the gui i remove flag GUI_FLAG_VISIBLE
then surely the gui disappears but doesn't close , my controls are still revoked and the button seems to be 'pressed' whenever i press space bar or Enter key
Title: Re: GUI Button
Post by: Anik on Apr 23, 2017, 08:53 AM
Set it to null.

Button = null
Title: Re: GUI Button
Post by: Sebastian on Apr 23, 2017, 12:02 PM
To remove it totally, you need to set it to null.
Otherwise, it will still exist, and will still respond.

The best way is to make a function that recreates the whole GUI you need, and another to remove it.
So all you will do it calling that function when need to show/hide the GUI.

You can check Anik's GUI Registration System, you will understand what I mean.
Title: Re: GUI Button
Post by: Dagger on Apr 23, 2017, 01:35 PM
Thanks for the Help.