• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

Disabling ESC menu to allow for custom menu?

Status
Not open for further replies.
Level 8
Joined
Aug 2, 2006
Messages
346
Hi, I'm trying to change the menu that pops up when a user hits ESC (It's in full screen mode, so f10 no longer works).

I have a trigger that brings up the custom menu whenever ESC is pressed, but what happens is you press ESC, the normal menu comes us, you press "return to game", THEN the escape menu pops up.

How can I disable the normal menu from showing up?
 
Level 7
Joined
Sep 24, 2008
Messages
281
UI- Hide "___" for all players

I'm not sure which of these you would want. Should you hide the menu, it still appears when you press escape. I'll keep working on this.
 
Level 8
Joined
Aug 2, 2006
Messages
346
Simply reshape the main menu to be your menu. I think I saw code to do that somewhere.... Just make sure the exit game button is available for people to use so they do not have to resort to alt + F4 to leave.

What do you mean reshape the menu? As far as I can tell, you can't modify the real game menu, but you CAN change up the "custom" menu as much as your heart's content, which is what I'm doing. The real game menu keeps showing up though...

Try hiding all the items on the default menu. I believe this causes it not to appear, but haven't tested it yet.

That just might be it. I'll try it as soon as the editor gets fixed for me. (crashes on startup...)
 
Level 8
Joined
Aug 2, 2006
Messages
346
Nope, hiding all the buttons didn't work, but you were close, VERY CLOSE!

I figured it out. I foolishly tried to hide the "any button" preset, (which returns -1, not a valid button), so the debug text in the game kindly told me that it had to be a number between 0 and 20... but hold on a second... not counting the "any" button, there's only 19! So what's that 20th one for?

Well hiding button 20 by itself doesn't work, but I just did a for loop to go through buttons 0 through 20, and hide them (you can use integers in the custom script field instead of using the presets, just be sure to put "lv_" in front of the loop variable name, which stands for local variable).

Now the custom menu works!

EDIT: Well hell... I don't know what I changed, but it WAS working for a little while there. It doesn't work anymore... Stupid normal menu pops up...
 
Level 7
Joined
Sep 24, 2008
Messages
281
You could solve this whole problem by importing the custom menu so as to replace the regular menu. Unfortunately, I can't help you with that, as it is not a function I'm familiar with (atleast, in starcraft 2). If I had to guess, I'd say that the menu references its object from the data editor, (what doesn't, now a days?) so I'd start looking for it there.
 
Status
Not open for further replies.
Top