Code: Select all
override void Ticker(void)
{
menuactive = Menu.OnNoPause;
}
Moderator: GZDoom Developers
Code: Select all
override void Ticker(void)
{
menuactive = Menu.OnNoPause;
}
Code: Select all
class StatsMenu : MyOptionMenu
{
KeyBindings mBindings;
override bool MenuEvent (int mkey, bool fromcontroller)
{
int key = mBindings.GetKeysForCommand("openmenu StatsMenu");
if (mkey == key)
{
Close();
return true;
}
return Super.MenuEvent(mkey, fromcontroller);
}
}
Code: Select all
if (mBindings == null) Console.Printf("Ruh roh!");
Code: Select all
int key1 = 0, key2 = 0;
[key1, key2] = mBindings.GetKeysForCommand(...);
Code: Select all
class StatsMenu : MyOptionMenu
{
KeyBindings mBindings;
override bool Responder (InputEventData ev)
{
if (ev.type == InputEventData.GUI_Event)
{
if (ev.subtype == InputEventData.GUI_KeyDown)
{
int ch = ev.data1;
int key1, key2;
mBindings = bindings;
[key1, key2] = mBindings.GetKeysForCommand("openmenu StatsMenu");
Console.Printf("%d - %d", ch, key1); // they're not the same thing!!!
if (ch == key1 || ch == key2)
{
Close();
return true;
}
}
}
return Super.Responder(ev);
}
}
Code: Select all
OptionMenuItemCreditDisplay Init (Name command, CVar graycheck = null)
{
Super.Init("Credits", command, graycheck);
mCredit = CVar.FindCVar("D4DCash");
return self;
}