File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -430,9 +430,7 @@ void CLocalGUI::SetMainMenuVisible(bool bVisible)
430
430
pGUI->SelectInputHandlers (INPUT_MOD);
431
431
}
432
432
433
- if (bVisible)
434
- pGUI->SetCursorAlpha (1 .0f );
435
- else
433
+ if (!bVisible)
436
434
pGUI->SetCursorAlpha (pGUI->GetCurrentServerCursorAlpha ());
437
435
}
438
436
}
Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ CMainMenu::CMainMenu(CGUI* pManager)
76
76
m_bStarted = false ;
77
77
m_fFader = 0 ;
78
78
m_ucFade = FADE_INVISIBLE;
79
+ m_bCursorAlphaReset = false ;
79
80
80
81
// Adjust window size to resolution
81
82
CVector2D ScreenSize = m_pManager->GetResolution ();
@@ -587,6 +588,17 @@ void CMainMenu::Update()
587
588
if (m_fFader > 0 .0f )
588
589
{
589
590
m_bIsVisible = true ; // Make cursor appear faster
591
+
592
+ if (!m_bCursorAlphaReset)
593
+ {
594
+ CGUI* pGUI = g_pCore->GetGUI ();
595
+
596
+ if (pGUI)
597
+ {
598
+ pGUI->SetCursorAlpha (1 .0f );
599
+ m_bCursorAlphaReset = true ;
600
+ }
601
+ }
590
602
}
591
603
592
604
// If the fade is complete
@@ -595,6 +607,7 @@ void CMainMenu::Update()
595
607
m_ucFade = FADE_VISIBLE;
596
608
m_bIsVisible = true ;
597
609
m_bIsFullyVisible = true ;
610
+
598
611
}
599
612
}
600
613
// Fade out
@@ -608,7 +621,11 @@ void CMainMenu::Update()
608
621
m_pBackground->SetAlpha (Clamp (0 .f , m_fFader, CORE_MTA_BG_MAX_ALPHA));
609
622
610
623
if (m_fFader < 1 .0f )
624
+ {
611
625
m_bIsVisible = false ; // Make cursor disappear faster
626
+ m_bCursorAlphaReset = false ;
627
+ }
628
+
612
629
613
630
// If the fade is complete
614
631
if (m_fFader <= 0 )
Original file line number Diff line number Diff line change @@ -150,6 +150,7 @@ class CMainMenu
150
150
// Fade variables
151
151
unsigned char m_ucFade;
152
152
float m_fFader;
153
+ bool m_bCursorAlphaReset;
153
154
154
155
// Animation variables
155
156
unsigned long ulPreviousTick;
You can’t perform that action at this time.
0 commit comments