From fec8fb231428ad14e8f63e218569514bd46f5247 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Sat, 8 Aug 2026 00:04:28 -0700 Subject: [PATCH] Fixed issue with notime breaking ui flow. --- src/ui/guiscript.cpp | 4 ++++ src/ui/window.cpp | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/ui/guiscript.cpp b/src/ui/guiscript.cpp index c7bcc08..6254356 100644 --- a/src/ui/guiscript.cpp +++ b/src/ui/guiscript.cpp @@ -222,6 +222,10 @@ void Script_ResetTime(idWindow *window, idList *src) { drawWin_t *win = NULL; if (parm && src->Num() > 1) { win = window->GetGui()->GetDesktop()->FindChildByName(*parm); + if ( !idStr::Icmp( parm->c_str(), "anim_in" ) || !idStr::Icmp( parm->c_str(), "anim_newIn" ) ) { + common->DPrintf( "Q4 menu trace: resetTime requested '%s', resolved '%s'\n", + parm->c_str(), ( win && win->win ) ? win->win->GetName() : "" ); + } parm = dynamic_cast((*src)[1].var); } if (win && win->win) { diff --git a/src/ui/window.cpp b/src/ui/window.cpp index e36c06b..95bf3ca 100644 --- a/src/ui/window.cpp +++ b/src/ui/window.cpp @@ -1080,6 +1080,10 @@ idWindow::Time */ void idWindow::Time() { + if ( !idStr::Icmp( name, "anim_newIn" ) && !noTime ) { + common->DPrintf( "Q4 menu trace: anim_newIn unexpectedly active at guiTime=%d epoch=%d\n", gui->GetTime(), timeLine ); + } + if ( noTime ) { return; } @@ -2642,6 +2646,9 @@ bool idWindow::Parse( idParser *src, bool rebuild) { SetupFromState(); PostParse(); + if ( !idStr::Icmp( name, "anim_newIn" ) ) { + common->DPrintf( "Q4 menu trace: parsed anim_newIn notime=%d events=%d\n", noTime ? 1 : 0, timeLineEvents.Num() ); + } // hook into the main window parsing for the gui editor // If we are in the gui editor then add the internal var to the @@ -2765,7 +2772,7 @@ idWindow::ResetTime ================ */ void idWindow::ResetTime(int t) { - if ( !idStr::Icmp( name, "anim_in" ) || !idStr::Icmp( name, "video_bethsoft" ) ) { + if ( !idStr::Icmp( name, "anim_in" ) || !idStr::Icmp( name, "anim_newIn" ) || !idStr::Icmp( name, "video_bethsoft" ) ) { common->DPrintf( "Q4 menu trace: ResetTime '%s' t=%d guiTime=%d\n", name.c_str(), t, gui->GetTime() ); }