Fixing select skin

This commit is contained in:
Agus 2026-03-02 18:47:32 -03:00
parent 72af9e00fb
commit 764fecfcca
2 changed files with 39 additions and 7 deletions

View file

@ -5432,7 +5432,7 @@ void CMinecraftApp::RemoveMemoryTextureFile(const wstring &wName)
LeaveCriticalSection(&csMemFilesLock); LeaveCriticalSection(&csMemFilesLock);
} }
void CMinecraftApp::ScanAndLoadCustomSkins() void CMinecraftApp::ScanAndLoadCustomSkins() // By 0xlibless ;)
{ {
DebugPrintf("CustomSkins scanning inited\n"); DebugPrintf("CustomSkins scanning inited\n");

View file

@ -256,8 +256,21 @@ void UIScene_SkinSelectMenu::handleInput(int iPad, int key, bool repeat, bool pr
} }
} }
break; break;
case SKIN_SELECT_PACK_PLAYER_CUSTOM:
if (app.m_customSkinNames.size() > 0)
{
wstring selectedSkin = app.m_customSkinNames[m_skinIndex];
app.SetPlayerSkin(iPad, selectedSkin);
app.SetPlayerCape(iPad, L"");
setCharacterSelected(true);
m_currentSkinPath = app.GetPlayerSkinName(iPad);
m_originalSkinId = app.GetPlayerSkinId(iPad);
ui.PlayUISFX(eSFX_Press);
}
break;
default: default:
if( m_currentPack != NULL ) if( m_currentPack != NULL )
{ {
DLCSkinFile *skinFile = m_currentPack->getSkinFile(m_skinIndex); DLCSkinFile *skinFile = m_currentPack->getSkinFile(m_skinIndex);
@ -605,7 +618,8 @@ void UIScene_SkinSelectMenu::InputActionOK(unsigned int iPad)
app.SetPlayerSkin(iPad, selectedSkin); app.SetPlayerSkin(iPad, selectedSkin);
app.SetPlayerCape(iPad, L""); app.SetPlayerCape(iPad, L"");
setCharacterSelected(true); setCharacterSelected(true);
m_currentSkinPath = selectedSkin; m_currentSkinPath = app.GetPlayerSkinName(iPad);
m_originalSkinId = app.GetPlayerSkinId(iPad);
ui.PlayUISFX(eSFX_Press); ui.PlayUISFX(eSFX_Press);
} }
break; break;
@ -1011,6 +1025,15 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
} }
} }
break; break;
case SKIN_SELECT_PACK_PLAYER_CUSTOM:
if (app.m_customSkinNames.size() > 0)
{
otherSkinPath = app.m_customSkinNames[nextIndex];
otherCapePath = L"";
othervAdditionalSkinBoxes = NULL;
backupTexture = TN_MOB_CHAR;
}
break;
default: default:
break; break;
} }
@ -1081,7 +1104,15 @@ void UIScene_SkinSelectMenu::handleSkinIndexChanged()
backupTexture = TN_MOB_CHAR; backupTexture = TN_MOB_CHAR;
} }
} }
break;
case SKIN_SELECT_PACK_PLAYER_CUSTOM:
if (app.m_customSkinNames.size() > 0)
{
otherSkinPath = app.m_customSkinNames[previousIndex];
otherCapePath = L"";
othervAdditionalSkinBoxes = NULL;
backupTexture = TN_MOB_CHAR;
}
break; break;
default: default:
break; break;
@ -1282,10 +1313,11 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
if(found) m_skinIndex = app.GetPlayerFavoriteSkinsPos(m_iPad); if(found) m_skinIndex = app.GetPlayerFavoriteSkinsPos(m_iPad);
} }
} }
break; break;
default: default:
break; break;
} }
} }
handleSkinIndexChanged(); handleSkinIndexChanged();
updatePackDisplay(); updatePackDisplay();