mouse main menu activation issue

Ask and answer questions about making games and related topics. Unrelated topics go in that other forum.

Moderators: marionline, SDHawk

Post Reply
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

mouse main menu activation issue

Post by Willy Elektrix »

Right clicking with the mouse will open the main menu in a game. However, I noticed an unusual behavior. If I right click whlie another menu is open, the main menu will open on top of the other menu. This occurs even if the "prevent main menu activation" bitset is on. It does not occur if I use ESC (instead of right click). ESC just close the menu normally and doesn't up the main menu.

Is this a bug or it is some intended part of the mouse controls?

If it matters, my main menu activation does involve running a script, which looks like this...

### Main menu open
plotscript, mainmenuopen, begin
open menu (menu:stats) ### Main menu also opens stats sidebar
open menu (menu:main)
end

I know I've been blowing up this Q&A section recently. I've been testing one of my games really hard.
TMC
Metal King Slime
Posts: 4101
Joined: Sun Apr 10, 2011 9:19 am

Post by TMC »

The "Menu action" script trigger actually gets triggered even if there's a menu with "prevent main menu activation", which is confusing and possibly unfortunate, possibly useful.

It sounds like you might have "Mouse support on menus" turned off. That's the setting that allows you to quit a menu by right-clicking. If you have both that and "Open menu on right click" on, that right clicks outside the menu and pressing ESC are meant to be equivalent. However, I see a problem: right clicks inside the menu move the cursor instead of closing the menu, but it looks like it'll still try to open the menu menu too.

I tried to test this myself, but unfortunately doing so has caused my right mouse button to break, again :( :( :(
User avatar
Willy Elektrix
Liquid Metal Slime
Posts: 910
Joined: Sun Aug 15, 2010 11:30 pm

Post by Willy Elektrix »

TMC wrote:The "Menu action" script trigger actually gets triggered even if there's a menu with "prevent main menu activation", which is confusing and possibly unfortunate, possibly useful.

It sounds like you might have "Mouse support on menus" turned off. That's the setting that allows you to quit a menu by right-clicking. If you have both that and "Open menu on right click" on, that right clicks outside the menu and pressing ESC are meant to be equivalent. However, I see a problem: right clicks inside the menu move the cursor instead of closing the menu, but it looks like it'll still try to open the menu menu too.

I tried to test this myself, but unfortunately doing so has caused my right mouse button to break, again :( :( :(
Mouse support on menus is turned on. Open menu on right lick is also on.

It sounds like you already know what's going on, but just in case you don't, I recorded an animated GIF for you!

Here's what happens.

1) I open the menu with right click.
2) I click the "collectodex" option to open another menu (this closes the main menu).
3) First, I right click OFF the collectodex menu. That closes the menu. That's good!
4) I open the main menu and the collectodex menu again.
5) Second, I right click ON the collectodex menu. That opens the main menu, but doesn't close the collectodex menu.
Attachments
xenonew0001.gif
xenonew0001.gif (689.56 KiB) Viewed 410 times
Post Reply