aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
diff options
context:
space:
mode:
authorSlenderman <ssimulpong@outlook.com>2026-03-01 13:38:11 -0500
committerSlenderman <ssimulpong@outlook.com>2026-03-01 13:38:11 -0500
commit90504b14794c912decbee51cb23cd966539cc354 (patch)
treed8f7ff41c003b64be6161ee4879c79ed3b4cb52d /Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
parent99a8c53bc1f84042e682a67abbd3f49d4b94dba8 (diff)
fix various things
Diffstat (limited to 'Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp24
1 files changed, 21 insertions, 3 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
index 6910dd65..e40dc37a 100644
--- a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
@@ -1249,7 +1249,13 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(m_packIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setCentreLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ const char* name = (LPCSTR)thisPack->getName().c_str();
+ int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
+ std::wstring wName(len, 0);
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
+ setCentreLabel(wName.c_str());
+ //setCentreLabel(thisPack->getName().c_str());
}
else
{
@@ -1268,7 +1274,13 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(nextPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setRightLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ const char* name = (LPCSTR)thisPack->getName().c_str();
+ int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
+ std::wstring wName(len, 0);
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
+ setRightLabel(wName.c_str());
+ //setRightLabel(thisPack->getName().c_str());
}
else
{
@@ -1287,7 +1299,13 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(previousPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setLeftLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ const char* name = (LPCSTR)thisPack->getName().c_str();
+ int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
+ std::wstring wName(len, 0);
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
+ setLeftLabel(wName.c_str());
+ //setLeftLabel(thisPack->getName().c_str());
}
else
{