Skip to content

Commit

Permalink
Merge branch 'master' into fix-server-name-validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernando-A-Rocha authored Oct 20, 2024
2 parents d1ae252 + 53deb03 commit 14adf87
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
22 changes: 14 additions & 8 deletions Client/core/CGUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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());
Expand All @@ -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();
Expand All @@ -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);
}
}

Expand Down
6 changes: 3 additions & 3 deletions Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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."
Expand Down

0 comments on commit 14adf87

Please sign in to comment.