foxygit / GZDoom Log in
commits tags

/wadsrc/static/zscript/ui/menu/wj_lobbymenu.zs · 732 B

raw
// Phone-join lobby: shows the QR code phones scan to connect (see
// src/net/webjoin) and the current player roster. Purely an overlay --
// closing it doesn't start or stop anything, it just stops showing the
// code. Opened via the "webjoin_lobby" console command.
extend class Menu
{
	static native void WJ_LobbyOpen();
	static native void WJ_LobbyDrawer();
}

class PhoneJoinLobbyMenu : GenericMenu
{
	override void Init(Menu parent)
	{
		Super.Init(parent);
		WJ_LobbyOpen();
	}

	override void Drawer()
	{
		WJ_LobbyDrawer();
	}

	override bool MenuEvent(int mkey, bool fromcontroller)
	{
		if (mkey == MKEY_Enter || mkey == MKEY_Back)
		{
			Close();
			return true;
		}
		return Super.MenuEvent(mkey, fromcontroller);
	}
}