View Issue Details

IDProjectCategoryView StatusLast Update
0000437Gameplay + OpenGL[All Projects] Bugpublic2017-03-16 13:22
ReporterMajor Cooke 
Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Summary0000437: Menu virtual init not working properly
DescriptionAt first I thought it was a bug with OnMenuCreated, but I think it's something deeper. See attached.

Also note that doing it the other way by making a custom OptionMenu itself and having it run OnMenuCreated after a super call in the init function will throw an error saying OnMenuCreated is an unknown property.

override void Init(Menu parent, OptionMenuDescriptor desc)
{
    Super.Init(parent, desc);
    // notify all items that the menu was just created.
    for(int i=0;i<mDesc.mItems.Size(); i++)
    {
        mDesc.mItems[i].OnMenuCreated();
    }
}
Steps To Reproduce1. Open the main menu.
2. Open the options menu.

It's supposed to output a bunch of Beeps in the console, as Submenu was replaced with SubmenuBeep, but it does not.
TagsNo tags attached.

Relationships

Activities

Major Cooke

Major Cooke

2017-03-15 14:16

reporter  

test.pk3 (2,399 bytes)
Graf Zahl

Graf Zahl

2017-03-16 12:56

administrator   ~0001023

Last edited: 2017-03-16 12:56

View 2 revisions

The base declaration was missing a 'virtual' qualifier. Which you would have noticed if you hadn't forgotten the 'override' qualifier...

Major Cooke

Major Cooke

2017-03-16 13:22

reporter   ~0001025

You didn't specifically state if it was meant to be virtual or not in your commit message so I assumed something like "not". You just called it a callback.

Issue History

Date Modified Username Field Change
2017-03-15 14:16 Major Cooke New Issue
2017-03-15 14:16 Major Cooke File Added: test.pk3
2017-03-16 12:56 Graf Zahl Status new => resolved
2017-03-16 12:56 Graf Zahl Resolution open => fixed
2017-03-16 12:56 Graf Zahl Note Added: 0001023
2017-03-16 12:56 Graf Zahl Note Edited: 0001023 View Revisions
2017-03-16 13:22 Major Cooke Note Added: 0001025