aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/UI
diff options
context:
space:
mode:
authorvoid_17 <61356189+void2012@users.noreply.github.com>2026-03-02 02:15:04 +0700
committerGitHub <noreply@github.com>2026-03-02 02:15:04 +0700
commit38b442b1e33726f011fd6a28824fb8e6e99ccb5a (patch)
tree786ce5f5a3fc3ac0f1010ac3fbb944862741c554 /Minecraft.Client/Common/UI
parentf5ebb5bfff1c54d031a682dfba1b29f70ffb90df (diff)
parent6080c4ceac7a0968db06deac0853209f69aba2ab (diff)
Merge pull request #37 from simulpingus/main
Unlock DLC, fix world names in load menu, fix dlc pack titles
Diffstat (limited to 'Minecraft.Client/Common/UI')
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp24
2 files changed, 22 insertions, 4 deletions
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
index e2cbc2aa..1c07e540 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
@@ -62,7 +62,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
LoadMenuInitData *params = (LoadMenuInitData *)initData;
- //m_labelGameName.init(app.GetString(IDS_WORLD_NAME));
+ m_labelGameName.init(app.GetString(IDS_WORLD_NAME));
m_labelSeed.init(L"");
m_labelCreatedMode.init(app.GetString(IDS_CREATED_IN_SURVIVAL));
diff --git a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
index 6910dd65..bce5e34e 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 = static_cast<const char*>(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 = static_cast<const char*>(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 = static_cast<const char*>(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
{