View Issue Details

IDProjectCategoryView StatusLast Update
0000301Gameplay + OpenGL[All Projects] Featurepublic2017-03-14 04:22
ReporterMajor Cooke 
Assigned To 
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionno change required 
Summary0000301: ChangeMenu virtual
DescriptionIt would be nice if menu could have a ChangeMenu virtual of some kind that could allow something to happen to it without needing to define a selectable entity to trigger it. Right now, for example, I have a custom ListMenu and a special selectable for it, and the selectable has to call the custom ListMenu's custom function to make it perform a custom funcion to get it to move.

I find this to be a bit of an unnecessary code bloat since I have to go through and replace any/all list/option menu selectables in the entirety of MenuDef, not to mention future items would have to be manually maintained by modders.

Here's what I propose:
static virtual bool ChangeMenu(name menuAction, int menuParams, <ListMenuItem/OptionMenuItem> 
activator)
{
    SetMenu(menuAction, menuParams);
    return true;
}


This will allow modders to not have to reinvent <List/Option>MenuItems just to make something happen before it's activated.
TagsNo tags attached.

Relationships

Activities

_mental_

_mental_

2017-02-26 05:06

developer   ~0000778

The proposed way cannot be implemented because static and virtual functions are mutually exclusive things.
Major Cooke

Major Cooke

2017-02-26 05:08

reporter   ~0000779

I don't expect a 1:1.
Graf Zahl

Graf Zahl

2017-03-14 04:22

administrator   ~0000984

Every time I think about this I come to the same conclusion:

This is best done by implementing a new menu item type that preforms the requested menu creation and afterward gets the current menu and performs some custom actions. It's not really something I can solve on the internal side.

Issue History

Date Modified Username Field Change
2017-02-19 08:36 Major Cooke New Issue
2017-02-26 05:06 _mental_ Note Added: 0000778
2017-02-26 05:08 Major Cooke Note Added: 0000779
2017-03-14 04:22 Graf Zahl Status new => closed
2017-03-14 04:22 Graf Zahl Resolution open => no change required
2017-03-14 04:22 Graf Zahl Note Added: 0000984