Author Topic: Attempting to replace the escape menu.  (Read 1556 times)

I'll make it the same name if it's needed.
No. Don't. You should not delete a default GUI!!!

Just modify the default one with whatever changes you've made.

No. Don't. You should not delete a default GUI!!!

Just modify the default one with whatever changes you've made.
But how do I make these changes show up? I'm trying to make an improved escape menu. The code is not working. I have no idea what I'm doing. I'm pretty sure the gui works, it should at least show up.

How would I make a gui replace the escape menu? I recall doing this in the past, but I don't remember how I did it.

Modify the default GUI, or delete it and name the new one exactly the same.

That extends to all levels, too. For every feature you incorporate that performs the same function as a default feature (e.g. Load Saves button) you should name that element the same thing as well. Maximize compatibility.

But how do I make these changes show up? I'm trying to make an improved escape menu. The code is not working. I have no idea what I'm doing. I'm pretty sure the gui works, it should at least show up.

How would I make a gui replace the escape menu? I recall doing this in the past, but I don't remember how I did it.
Did you even try the code I gave you?


Modify the default GUI
On second thought this is what I'd do

Maximize compatibility.
If you want to maximize compatibility then don't delete the GUI at all.

You shouldn't have to delete the GUI. Just package the onWake function and have it open your replacement GUI.

You shouldn't have to delete the GUI. Just package the onWake function and have it open your replacement GUI.

I would recommend one of two things.

1) package the function for the actual button press and have it do canvas.pushdialog(yourgui);

2) package the onwake function and have it remove just the window component of the escape menu and insert your own.  Note that you would be keeping the canvas intact in this case.

1) package the function for the actual button press and have it do canvas.pushdialog(yourgui);
This is what I gave him code for
Still waiting for him to try it :l

At first it did not work, so i modified the code a bit, and now when I try to open the escape menu it lags a bit then opens nothing. I can't find the gui I made in the gui editor.

Here's a download, maybe you could find something specific that's wrong.
https://www.mediafire.com/?swun362c2nmuwcv

Very rarely can you just copy and paste code blindy
You have to actually change the gui name that it's pushing to match the name of your gui


Modify the default GUI
This is still what I'd do, otherwise you break compatibility with other mods that modify it
« Last Edit: February 18, 2014, 07:58:30 AM by Headcrab Zombie »