Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

Hello

I have been working on the menu, and finally made the design i want for the menu. But now i ran into a problem that i hope some of you more experienced programmers can help me with.

If the module have no group specified, it will sort by the value that is specified in group, like i here made home the first entry: new MenuEntry("Home", NULL, NULL, 0, NULL);.

But if i try to this:

MenuEntry("Inventory", "Account", NULL, 0, NULL);

the entry link "Inventory" will be first inside the group entry of Account, but there is no way to specify where i want the group itself inserted. Etc i want to do this:

Home

Account

-Preferences

-Inventory

Communication

-Forum

-Messages

Logout

Is there someone out there, that can help me make inside_menu somehow sort the groups too. Because as it is now, the Home and Logout can be placed with the 4th calue of menuEntry, but there is no way to sort Account and Communication, as the 4th value here will specify the location of the submenus insted.

 

I guess something can be worked out by editing the menuEntry and the SortMenuCallback functions in Common.php, but i have no idea how to do this correctly. I tried to fiddle around with it, but with no luck

Edited by nimoke
Posted

I managed to fix this myself, by adding an extra variable to the menuEntry function, and sort by groupPosition before position.

To everyone who read this: Thanks for your time! :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...