View Issue Details

IDProjectCategoryView StatusLast Update
0000427Gameplay + OpenGL(No Category)public2017-03-14 06:26
ReporterMajor Cooke 
Assigned To 
PrioritynormalSeverityminorReproducibilityhave not tried
Status resolvedResolutionfixed 
Summary0000427: Menu OnCreate() virtual
DescriptionThe init() command within options is only built for the game starting up itself.

For example, place this inside of, for example, any OptionMenuItem's init functions.
let plr = players[consoleplayer].mo;
if (plr)
{
    Console.Printf("Okay");
}
else
{
    Console.Printf("Ruh roh!");
}


You get a bunch of "Ruh roh!"s upon game start-up, but when you access the menus where they are used, they don't print "Okay".

That's where my suggestion comes into play.

OnCreate could be used for whenever a menu object like a menu itself, or a widget is created.
TagsNo tags attached.

Relationships

Activities

Graf Zahl

Graf Zahl

2017-03-14 04:12

administrator   ~0000983

I added an OnMenuCreated virtual to the items, because the items themselves get created at compile time, calling it OnCreated would be misleading.
Major Cooke

Major Cooke

2017-03-14 06:26

reporter   ~0000990

Works for me! Thanks!

Issue History

Date Modified Username Field Change
2017-03-13 12:08 Major Cooke New Issue
2017-03-14 04:12 Graf Zahl Note Added: 0000983
2017-03-14 04:13 Graf Zahl Status new => resolved
2017-03-14 04:13 Graf Zahl Resolution open => fixed
2017-03-14 06:26 Major Cooke Note Added: 0000990