Menu problem

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

Moderators: marionline, SDHawk

Post Reply
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Menu problem

Post by Mogri »

I'm not sure if this is something I'm doing wrong or an engine bug.

Scenario 1: I create a menu in CUSTOM and disable the cancel button. When I access that menu in GAME, the cancel button has no effect.

Scenario 2: I create a menu in a plotscript:

Code: Select all

   m := create menu
   set menu bit(m, menubit:no close, true)
When I access this menu in GAME, the cancel button opens the main menu.

My expectation is that the cancel button would have no effect in scenario 2. Is there something else I need to do here?
User avatar
Gizmog
Metal King Slime
Posts: 2615
Joined: Tue Feb 19, 2008 5:41 am

Post by Gizmog »

There's a menu bitset for "Prevent Main Menu Activation" (menubit:prevent main menu, apparently). That might be what you want.
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Hm, so there is. But I never set it for my other menus.

At least my problem is solved :)
User avatar
Bob the Hamster
Liquid Metal King Slime
Posts: 7460
Joined: Tue Oct 16, 2007 2:34 pm
Location: Hamster Republic (Ontario Enclave)
Contact:

Post by Bob the Hamster »

Could it be a difference in the "Allow Gameplay And Scripts" bitset?

I believe that menus you create in custom have that bit default to OFF, but menus you create in a script have it default to ON
User avatar
Mogri
Super Slime
Posts: 4598
Joined: Mon Oct 15, 2007 6:38 pm
Location: Austin, TX
Contact:

Post by Mogri »

Bob the Hamster wrote:Could it be a difference in the "Allow Gameplay And Scripts" bitset?

I believe that menus you create in custom have that bit default to OFF, but menus you create in a script have it default to ON
Yes, I realized that in the car on the way to work today. It's unintuitive that this is separate from and overrides the main menu trigger bit, but it makes a certain sense, I guess.
Post Reply