Sources Dialog: Game mode drodown should use MENUENTRY value, not folder name

Description

In the old gui we had the list of available game modes on the menu, and it used to show the value of the MENUENTRY tag from the game mode's mistinfio.lst file. Currently the dropdown on the sources dialog just shows the folder name, which in some cases is not "pretty". We should change bak to use the MENUENTRY value which otherwise is useless.

Environment

None

Activity

Show:
James Dempsey
October 13, 2012, 6:02 AM

That would be great, thanks

Stefan Radermacher
October 20, 2012, 4:47 AM

Unfortunately I'm a little stumped as how to get the getMenuentry() results to the FacadeComboBoxModel via GameModeFacade. setListFacade() seems to magically access the normal "name", and I can't find where to inject the change there. James, can you give me a hint? The facades still confuse me sometimes.

James Dempsey
October 20, 2012, 5:04 AM

The display is always driven by toString() for the object being displayed. To customise this you may need to use a specific display object which contains the game mode but displays the menu name and not the normal toString. At this stage I would not recommend changing the toStirng of the game mode as it may have other side effects.

Stefan Radermacher
October 24, 2012, 5:19 AM

Implemented as of subversion revision 17978.
Not really pretty though, as all game modes are now held in memory twice.

I have noticed that the MENUENTRY values still contain "&" characters used for the accelerator key. Internally this value can be retrieved with tow methods: getMenuEntry() and getDisplayName(), the latter of which has the "&" removed. I have used getDisplayName() for this fix. The method getMenuEntry() is no longer used outside of old gui classes and could in theory be removed, as could the need for the "&" signs, since we no longer use these in window menus.

Stefan Radermacher
December 14, 2013, 6:17 AM

As the old GUI code is now completely removed, I have removed the unneeded getMenuEntry() method as well as the remaining "&" characters from the MENUENTRY tags in all game modes that still had them.
Subversion revision 22602.

Fixed

Assignee

Stefan Radermacher

Reporter

Stefan Radermacher

Labels

None

Theme

New User Interface

Epic/Theme

None

Pending User Input

None

Components

Fix versions

Affects versions

Priority

Minor
Configure