@@ -322,10 +322,6 @@ void CLocalGUI::Draw ( void )
322322 {
323323 pGUI->Draw ( );
324324 }
325- else
326- {
327- WriteDebugEvent ( " WARNING: CLocalGUI::Draw() called, but CLocalGUI::CreateObjects() isn't!" );
328- }
329325
330326 // If the system state was 8, make sure we don't do another delayed frame
331327 if ( SystemState == 8 )
@@ -345,10 +341,6 @@ void CLocalGUI::Invalidate ( void )
345341 {
346342 pGUI->Invalidate ( );
347343 }
348- else
349- {
350- WriteDebugEvent ( " WARNING: CLocalGUI::Invalidate() called, but CLocalGUI::CreateObjects() isn't!" );
351- }
352344}
353345
354346
@@ -361,10 +353,6 @@ void CLocalGUI::Restore ( void )
361353 // Restore the GUI
362354 pGUI->Restore ();
363355 }
364- else
365- {
366- WriteDebugEvent ( " WARNING: CLocalGUI::Restore() called, but CLocalGUI::CreateObjects() isn't!" );
367- }
368356}
369357
370358void CLocalGUI::DrawMouseCursor ( void )
@@ -398,10 +386,6 @@ void CLocalGUI::SetConsoleVisible ( bool bVisible )
398386 else
399387 pGUI->SetCursorAlpha ( pGUI->GetCurrentServerCursorAlpha () );
400388 }
401- else
402- {
403- WriteDebugEvent ( " WARNING: CLocalGUI::HideConsole() called, but CLocalGUI::CreateObjects() isn't!" );
404- }
405389}
406390
407391
@@ -411,11 +395,7 @@ bool CLocalGUI::IsConsoleVisible ( void )
411395 {
412396 return m_pConsole->IsVisible ();
413397 }
414- else
415- {
416- WriteDebugEvent ( " WARNING: CLocalGUI::IsConsoleVisible() called, but CLocalGUI::CreateObjects() isn't!" );
417- return false ;
418- }
398+ return false ;
419399}
420400
421401
@@ -425,10 +405,6 @@ void CLocalGUI::EchoConsole ( const char* szText )
425405 {
426406 m_pConsole->Echo ( szText );
427407 }
428- else
429- {
430- WriteDebugEvent ( " WARNING: CLocalGUI::EchoConsole() called, but CLocalGUI::CreateObjects() isn't" );
431- }
432408}
433409
434410
@@ -463,10 +439,6 @@ void CLocalGUI::SetMainMenuVisible ( bool bVisible )
463439 else
464440 pGUI->SetCursorAlpha ( pGUI->GetCurrentServerCursorAlpha () );
465441 }
466- else
467- {
468- WriteDebugEvent ( " WARNING: CLocalGUI::SetMainMenuVisible() called, but CLocalGUI::CreateObjects() isn't" );
469- }
470442}
471443
472444
@@ -476,11 +448,7 @@ bool CLocalGUI::IsMainMenuVisible ( void )
476448 {
477449 return m_pMainMenu->IsVisible ();
478450 }
479- else
480- {
481- WriteDebugEvent ( " WARNING: CLocalGUI::IsMainMenuVisible() called, but CLocalGUI::CreateObjects() isn't" );
482- return false ;
483- }
451+ return false ;
484452}
485453
486454CChat* CLocalGUI::GetChat ( void )
@@ -502,10 +470,6 @@ void CLocalGUI::SetChatBoxVisible ( bool bVisible )
502470 m_pChat->SetVisible ( bVisible );
503471 m_bChatboxVisible = bVisible;
504472 }
505- else
506- {
507- WriteDebugEvent ( " WARNING: CLocalGUI::SetChatBoxVisible() called, but CLocalGUI::CreateObjects() isn't" );
508- }
509473}
510474
511475void CLocalGUI::SetDebugViewVisible ( bool bVisible )
@@ -516,10 +480,6 @@ void CLocalGUI::SetDebugViewVisible ( bool bVisible )
516480 m_pDebugView->SetVisible ( bVisible );
517481 m_pDebugViewVisible = bVisible;
518482 }
519- else
520- {
521- WriteDebugEvent ( " WARNING: CLocalGUI::SetDebugViewVisible() called, but CLocalGUI::CreateObjects() isn't" );
522- }
523483}
524484
525485bool CLocalGUI::IsChatBoxVisible ( void )
@@ -528,11 +488,7 @@ bool CLocalGUI::IsChatBoxVisible ( void )
528488 {
529489 return m_bChatboxVisible;
530490 }
531- else
532- {
533- WriteDebugEvent ( " WARNING: CLocalGUI::IsChatBoxVisible() called, but CLocalGUI::CreateObjects() isn't" );
534- return false ;
535- }
491+ return false ;
536492}
537493
538494bool CLocalGUI::IsDebugViewVisible ( void )
@@ -541,11 +497,7 @@ bool CLocalGUI::IsDebugViewVisible ( void )
541497 {
542498 return m_pDebugViewVisible;
543499 }
544- else
545- {
546- WriteDebugEvent ( " WARNING: CLocalGUI::IsDebugViewVisible() called, but CLocalGUI::CreateObjects() isn't" );
547- return false ;
548- }
500+ return false ;
549501}
550502
551503
@@ -555,10 +507,6 @@ void CLocalGUI::SetChatBoxInputEnabled ( bool bInputEnabled )
555507 {
556508 m_pChat->SetInputVisible ( bInputEnabled );
557509 }
558- else
559- {
560- WriteDebugEvent ( " WARNING: CLocalGUI::SetChatBoxInputEnabled() called, but CLocalGUI::CreateObjects() isn't" );
561- }
562510}
563511
564512
@@ -568,11 +516,7 @@ bool CLocalGUI::IsChatBoxInputEnabled ( void )
568516 {
569517 return m_pChat->IsInputVisible () && m_bChatboxVisible;
570518 }
571- else
572- {
573- WriteDebugEvent ( " WARNING: CLocalGUI::IsChatBoxInputEnabled() called, but CLocalGUI::CreateObjects() isn't" );
574- return false ;
575- }
519+ return false ;
576520}
577521
578522
@@ -582,10 +526,16 @@ void CLocalGUI::EchoChat ( const char* szText, bool bColorCoded )
582526 {
583527 m_pChat->Output ( szText, bColorCoded );
584528 }
585- else
529+ }
530+
531+ bool CLocalGUI::IsWebRequestGUIVisible ()
532+ {
533+ auto pWebCore = g_pCore->GetWebCore ();
534+ if ( pWebCore )
586535 {
587- WriteDebugEvent ( " WARNING: CLocalGUI::EchoChat() called, but CLocalGUI::CreateObjects() isn't " );
536+ return pWebCore-> IsRequestsGUIVisible ( );
588537 }
538+ return false ;
589539}
590540
591541void CLocalGUI::EchoDebug ( const char * szText )
@@ -594,10 +544,6 @@ void CLocalGUI::EchoDebug ( const char* szText )
594544 {
595545 m_pDebugView->Output ( szText, false );
596546 }
597- else
598- {
599- WriteDebugEvent ( " WARNING: CLocalGUI::EchoDebug() called, but CLocalGUI::CreateObjects() isn't" );
600- }
601547}
602548
603549bool CLocalGUI::ProcessMessage ( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam )
@@ -767,7 +713,7 @@ bool CLocalGUI::InputGoesToGUI ( void )
767713
768714 // Here we're supposed to check if things like menues are up, console is up or the chatbox is expecting input
769715 // If the console is visible OR the chat is expecting input OR the mainmenu is visible
770- return ( IsConsoleVisible () || IsMainMenuVisible () || IsChatBoxInputEnabled () || m_bForceCursorVisible || pGUI->GetGUIInputEnabled () || !CCore::GetSingleton ().IsFocused () || g_pCore-> GetWebCore ()-> IsRequestsGUIVisible () );
716+ return ( IsConsoleVisible () || IsMainMenuVisible () || IsChatBoxInputEnabled () || m_bForceCursorVisible || pGUI->GetGUIInputEnabled () || !CCore::GetSingleton ().IsFocused () || IsWebRequestGUIVisible () );
771717}
772718
773719
0 commit comments