4.10 support update (unfinished and untested).

This commit is contained in:
Mari the Deer 2022-12-05 02:10:56 +01:00
commit 8e952f412f
80 changed files with 2343 additions and 2356 deletions

View file

@ -190,17 +190,28 @@ Class DemolitionistMenu : GenericMenu
'DemolitionistHelpTab',
'DemolitionistSecretTab'
};
// since GZDoom 4.10 we have to "pre-tick" tabs as soon as they're initialized
for ( int i=0; i<deftabs.Size()-2; i++ )
tabs.Push(DemolitionistMenuTab(new(deftabs[i])).Init(self));
// custom tabs go before the help and secret tabs
for ( int i=0; i<AllClasses.Size(); i++ )
{
let ct = (Class<DemolitionistMenuTabCustom>)(AllClasses[i]);
let t = DemolitionistMenuTab(new(deftabs[i])).Init(self);
t.Ticker();
tabs.Push(t);
}
// custom tabs go before the help and secret tabs
foreach ( cls:AllClasses )
{
let ct = (Class<DemolitionistMenuTabCustom>)(cls);
if ( !ct || (ct.GetParentClass() != 'DemolitionistMenuTabCustom') ) continue;
tabs.Push(DemolitionistMenuTab(new(ct)).Init(self));
let t = DemolitionistMenuTab(new(ct)).Init(self);
t.Ticker();
tabs.Push(t);
}
for ( int i=deftabs.Size()-2; i<deftabs.Size(); i++ )
tabs.Push(DemolitionistMenuTab(new(deftabs[i])).Init(self));
{
let t = DemolitionistMenuTab(new(deftabs[i])).Init(self);
t.Ticker();
tabs.Push(t);
}
if ( shnd.menustate )
{
Class<DemolitionistMenuTab> saved = shnd.menustate.At("LastTab");