mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-12-01 00:21:35 +00:00
- Fixed: The user could interact with the conversation menu during demo playback and mess up the
demo. - Fixed: The conversation menu stayed up during demo playback even after the conversation was over. SVN r3419 (trunk)
This commit is contained in:
parent
6d59fb3e9f
commit
a12729670b
1 changed files with 20 additions and 0 deletions
|
@ -809,6 +809,15 @@ public:
|
|||
|
||||
bool MenuEvent(int mkey, bool fromcontroller)
|
||||
{
|
||||
if (demoplayback)
|
||||
{ // During demo playback, don't let the user do anything besides close this menu.
|
||||
if (mkey == MKEY_Back)
|
||||
{
|
||||
Close();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (mkey == MKEY_Up)
|
||||
{
|
||||
if (--mSelection < 0) mSelection = mResponses.Size() - 1;
|
||||
|
@ -894,6 +903,10 @@ public:
|
|||
|
||||
bool Responder(event_t *ev)
|
||||
{
|
||||
if (demoplayback)
|
||||
{ // No interaction during demo playback
|
||||
return false;
|
||||
}
|
||||
if (ev->type == EV_GUI_Event && ev->subtype == EV_GUI_Char && ev->data1 >= '0' && ev->data1 <= '9')
|
||||
{ // Activate an item of type numberedmore (dialogue only)
|
||||
mSelection = ev->data1 == '0' ? 9 : ev->data1 - '1';
|
||||
|
@ -1401,6 +1414,13 @@ void P_ConversationCommand (int netcode, int pnum, BYTE **stream)
|
|||
{
|
||||
player_t *player = &players[pnum];
|
||||
|
||||
// The conversation menus are normally closed by the menu code, but that
|
||||
// doesn't happen during demo playback, so we need to do it here.
|
||||
if (demoplayback && DMenu::CurrentMenu != NULL &&
|
||||
DMenu::CurrentMenu->IsKindOf(RUNTIME_CLASS(DConversationMenu)))
|
||||
{
|
||||
DMenu::CurrentMenu->Close();
|
||||
}
|
||||
if (netcode == DEM_CONVREPLY)
|
||||
{
|
||||
int nodenum = ReadWord(stream);
|
||||
|
|
Loading…
Reference in a new issue