diff --git a/Client/core/CGUI.cpp b/Client/core/CGUI.cpp index c4a2729d7a..6273536347 100644 --- a/Client/core/CGUI.cpp +++ b/Client/core/CGUI.cpp @@ -56,9 +56,15 @@ CLocalGUI::~CLocalGUI() void CLocalGUI::SetSkin(const char* szName) { + CVector2D consolePos, consoleSize; + bool guiWasLoaded = m_pMainMenu != NULL; if (guiWasLoaded) + { + consolePos = m_pConsole->GetPosition(); + consoleSize = m_pConsole->GetSize(); DestroyWindows(); + } std::string error; @@ -93,7 +99,11 @@ void CLocalGUI::SetSkin(const char* szName) m_LastSettingsRevision = cvars->GetRevision(); if (guiWasLoaded) + { CreateWindows(guiWasLoaded); + m_pConsole->SetPosition(consolePos); + m_pConsole->SetSize(consoleSize); + } if (CCore::GetSingleton().GetConsole() && !error.empty()) CCore::GetSingleton().GetConsole()->Echo(error.c_str()); @@ -104,8 +114,8 @@ void CLocalGUI::ChangeLocale(const char* szName) bool guiWasLoaded = m_pMainMenu != NULL; assert(guiWasLoaded); - CVector2D vPos = m_pConsole->GetPosition(); - CVector2D vSize = m_pConsole->GetSize(); + CVector2D consolePos = m_pConsole->GetPosition(); + CVector2D consoleSize = m_pConsole->GetSize(); if (guiWasLoaded) DestroyWindows(); @@ -119,12 +129,8 @@ void CLocalGUI::ChangeLocale(const char* szName) if (guiWasLoaded) { CreateWindows(guiWasLoaded); - - if (m_pConsole != nullptr) - { - m_pConsole->SetPosition(vPos); - m_pConsole->SetSize(vSize); - } + m_pConsole->SetPosition(consolePos); + m_pConsole->SetSize(consoleSize); } } diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index 0947cb8c01..e42652208b 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-10-10 20:57+0000\n" +"POT-Creation-Date: 2024-10-18 20:00+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -298,7 +298,7 @@ msgstr "" #: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 #: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 #: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 -#: Client/core/CGUI.cpp:87 Client/core/CCore.cpp:1275 +#: Client/core/CGUI.cpp:93 Client/core/CCore.cpp:1275 #: Client/core/CCore.cpp:1288 Client/core/CSettings.cpp:2941 #: Client/core/CSettings.cpp:4166 Client/core/CSettings.cpp:4194 #: Client/core/CSettings.cpp:4764 Client/core/CConnectManager.cpp:80 @@ -1818,7 +1818,7 @@ msgid "English" msgstr "" #. Even the default skin doesn't work, so give up -#: Client/core/CGUI.cpp:86 +#: Client/core/CGUI.cpp:92 msgid "" "The skin you selected could not be loaded, and the default skin also could " "not be loaded, please reinstall MTA."