@@ -319,6 +319,24 @@ CMainMenu::CMainMenu(CGUI* pManager)
319
319
m_pFeatureBranchAlertLabel->SetHorizontalAlign (CGUI_ALIGN_HORIZONTALCENTER);
320
320
m_pFeatureBranchAlertLabel->SetVerticalAlign (CGUI_ALIGN_VERTICALCENTER);
321
321
#endif
322
+
323
+ #if _WIN32_WINNT <= _WIN32_WINNT_WINXP
324
+ // Add annonying alert
325
+ m_pAlertTexture.reset (reinterpret_cast <CGUITexture*>(m_pManager->CreateTexture ()));
326
+ std::int32_t buffer = 0xFFFF0000 ;
327
+ m_pAlertTexture->LoadFromMemory (&buffer, 1 , 1 ); // HACK: Load red dot
328
+
329
+ m_pAlertImage.reset (reinterpret_cast <CGUIStaticImage*>(m_pManager->CreateStaticImage (m_pBackground)));
330
+ m_pAlertImage->LoadFromTexture (m_pAlertTexture.get ());
331
+ m_pAlertImage->SetPosition ({ 0 .0f , 0 .0f }, false );
332
+ m_pAlertImage->SetSize ({ ScreenSize.fX , 20 .0f });
333
+
334
+ #define XP_VISTA_WARNING _ (" MTA will not receive updates on XP/Vista after July 2019.\n\n Upgrade Windows to play on the latest servers." )
335
+ m_pAlertLabel.reset(reinterpret_cast <CGUILabel*>(m_pManager->CreateLabel (m_pAlertImage.get(), XP_VISTA_WARNING)));
336
+ m_pAlertLabel->SetPosition ({ 0 .0f , 2 .0f }, false );
337
+ m_pAlertLabel->SetSize ({ ScreenSize.fX , 20 .0f });
338
+ m_pAlertLabel->SetHorizontalAlign (CGUI_ALIGN_HORIZONTALCENTER);
339
+ #endif
322
340
}
323
341
324
342
CMainMenu::~CMainMenu ()
@@ -623,6 +641,13 @@ void CMainMenu::Update()
623
641
if (WaitForMenu == 275 )
624
642
GetVersionUpdater ()->EnableChecking (true );
625
643
644
+ #if _WIN32_WINNT <= _WIN32_WINNT_WINXP
645
+ if (WaitForMenu == 275 )
646
+ {
647
+ CCore::GetSingletonPtr ()->ShowErrorMessageBox (" " , XP_VISTA_WARNING, " au-revoir-xp-vista" );
648
+ }
649
+ #endif
650
+
626
651
if (WaitForMenu < 300 )
627
652
WaitForMenu++;
628
653
}
0 commit comments