Remove Win32 wide string aliases from common UI

This commit is contained in:
notmatthewbeshay 2026-03-10 23:10:42 +11:00
parent 3b199b9ba2
commit 147ce20bc5
10 changed files with 26 additions and 26 deletions

View file

@ -28,7 +28,7 @@ Recipy::_eGroupType IUIScene_CraftingMenu::m_GroupTypeMapping9GridA[IUIScene_Cra
};
LPCWSTR IUIScene_CraftingMenu::m_GroupIconNameA[m_iMaxGroup3x3]=
const wchar_t *IUIScene_CraftingMenu::m_GroupIconNameA[m_iMaxGroup3x3]=
{
L"Structures",//Recipy::eGroupType_Structure,
L"Tools",//Recipy::eGroupType_Tool,
@ -118,7 +118,7 @@ IUIScene_CraftingMenu::IUIScene_CraftingMenu()
m_iIngredientsC=0;
}
LPCWSTR IUIScene_CraftingMenu::GetGroupNameText(int iGroupType)
const wchar_t *IUIScene_CraftingMenu::GetGroupNameText(int iGroupType)
{
switch(iGroupType)
{
@ -907,7 +907,7 @@ void IUIScene_CraftingMenu::UpdateHighlight()
// special case for the torch coal/charcoal
int id=pTempItemInstAdditional->getDescriptionId();
LPCWSTR itemstring;
const wchar_t *itemstring;
switch(id)
{

View file

@ -54,12 +54,12 @@ protected:
int iVSlotIndexA[3]; // index of the v slots currently displayed
static LPCWSTR m_GroupIconNameA[m_iMaxGroup3x3];
static const wchar_t *m_GroupIconNameA[m_iMaxGroup3x3];
static Recipy::_eGroupType m_GroupTypeMapping4GridA[m_iMaxGroup2x2];
static Recipy::_eGroupType m_GroupTypeMapping9GridA[m_iMaxGroup3x3];
Recipy::_eGroupType *m_pGroupA;
static LPCWSTR m_GroupTabNameA[3];
static const wchar_t *m_GroupTabNameA[3];
static _eGroupTab m_GroupTabBkgMapping2x2A[m_iMaxGroup2x2];
static _eGroupTab m_GroupTabBkgMapping3x3A[m_iMaxGroup3x3];
_eGroupTab *m_pGroupTabA;
@ -78,7 +78,7 @@ public:
IUIScene_CraftingMenu();
protected:
LPCWSTR GetGroupNameText(int iGroupType);
const wchar_t *GetGroupNameText(int iGroupType);
void CheckRecipesAvailable();
void UpdateHighlight();
@ -104,16 +104,16 @@ protected:
virtual void setIngredientSlotRedBox(int index, bool show) = 0;
virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item) = 0;
virtual void setIngredientDescriptionRedBox(int index, bool show) = 0;
virtual void setIngredientDescriptionText(int index, LPCWSTR text) = 0;
virtual void setIngredientDescriptionText(int index, const wchar_t *text) = 0;
virtual void setShowCraftHSlot(int iIndex, bool show) = 0;
virtual void showTabHighlight(int iIndex, bool show) = 0;
virtual void setGroupText(LPCWSTR text) = 0;
virtual void setDescriptionText(LPCWSTR text) = 0;
virtual void setItemText(LPCWSTR text) = 0;
virtual void setGroupText(const wchar_t *text) = 0;
virtual void setDescriptionText(const wchar_t *text) = 0;
virtual void setItemText(const wchar_t *text) = 0;
virtual void scrollDescriptionUp() = 0;
virtual void scrollDescriptionDown() = 0;
virtual void updateHighlightAndScrollPositions() = 0;
virtual void updateVSlotPositions(int iSlots, int i) = 0;
virtual void UpdateMultiPanel() = 0;
};
};

View file

@ -602,7 +602,7 @@ void IUIScene_CreativeMenu::switchTab(ECreativeInventoryTabs tab)
// 4J JEV - Tab Spec Struct
IUIScene_CreativeMenu::TabSpec::TabSpec(LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups)
IUIScene_CreativeMenu::TabSpec::TabSpec(const wchar_t *icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups)
: m_icon(icon), m_descriptionId(descriptionId), m_staticGroupsCount(staticGroupsCount), m_dynamicGroupsCount(dynamicGroupsCount)
{

View file

@ -51,7 +51,7 @@ public:
static const int MAX_SIZE = rows * columns;
// 4J JEV - Images
const LPCWSTR m_icon;
const wchar_t *m_icon;
const int m_descriptionId;
const int m_staticGroupsCount;
ECreative_Inventory_Groups *m_staticGroupsA;
@ -64,7 +64,7 @@ public:
unsigned int m_staticItems;
public:
TabSpec( LPCWSTR icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups );
TabSpec( const wchar_t *icon, int descriptionId, int staticGroupsCount, ECreative_Inventory_Groups *staticGroups, int dynamicGroupsCount, ECreative_Inventory_Groups *dynamicGroups );
~TabSpec();
void populateMenu(AbstractContainerMenu *menu, int dynamicIndex, unsigned int page);

View file

@ -199,7 +199,7 @@ void UIComponent_TutorialPopup::_SetDescription(UIScene *interactScene, const st
}
}
std::wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc)
std::wstring UIComponent_TutorialPopup::_SetIcon(int icon, int iAuxVal, bool isFoil, const wchar_t *desc)
{
std::wstring temp(desc);

View file

@ -92,7 +92,7 @@ protected:
private:
void _SetDescription(UIScene *interactScene, const std::wstring &desc, const std::wstring &title, bool allowFade, bool isReminder);
std::wstring _SetIcon(int icon, int iAuxVal, bool isFoil, LPCWSTR desc);
std::wstring _SetIcon(int icon, int iAuxVal, bool isFoil, const wchar_t *desc);
std::wstring _SetImage(std::wstring &desc);
std::wstring ParseDescription(int iPad, std::wstring &text);
void UpdateInteractScenePosition(bool visible);

View file

@ -666,7 +666,7 @@ void UIScene_CraftingMenu::setIngredientDescriptionRedBox(int index, bool show)
m_slotListIngredients[index].showSlotRedBox(0,show);
}
void UIScene_CraftingMenu::setIngredientDescriptionText(int index, LPCWSTR text)
void UIScene_CraftingMenu::setIngredientDescriptionText(int index, const wchar_t *text)
{
m_labelIngredientsDesc[index].setLabel(text);
}
@ -690,17 +690,17 @@ void UIScene_CraftingMenu::showTabHighlight(int iIndex, bool show)
}
}
void UIScene_CraftingMenu::setGroupText(LPCWSTR text)
void UIScene_CraftingMenu::setGroupText(const wchar_t *text)
{
m_labelGroupName.setLabel(text);
}
void UIScene_CraftingMenu::setDescriptionText(LPCWSTR text)
void UIScene_CraftingMenu::setDescriptionText(const wchar_t *text)
{
m_labelDescription.setLabel(text);
}
void UIScene_CraftingMenu::setItemText(LPCWSTR text)
void UIScene_CraftingMenu::setItemText(const wchar_t *text)
{
m_labelItemName.setLabel(text);
}

View file

@ -190,12 +190,12 @@ protected:
virtual void setIngredientSlotRedBox(int index, bool show);
virtual void setIngredientDescriptionItem(int iPad, int index, std::shared_ptr<ItemInstance> item);
virtual void setIngredientDescriptionRedBox(int index, bool show);
virtual void setIngredientDescriptionText(int index, LPCWSTR text);
virtual void setIngredientDescriptionText(int index, const wchar_t *text);
virtual void setShowCraftHSlot(int iIndex, bool show);
virtual void showTabHighlight(int iIndex, bool show);
virtual void setGroupText(LPCWSTR text);
virtual void setDescriptionText(LPCWSTR text);
virtual void setItemText(LPCWSTR text);
virtual void setGroupText(const wchar_t *text);
virtual void setDescriptionText(const wchar_t *text);
virtual void setItemText(const wchar_t *text);
virtual void scrollDescriptionUp();
virtual void scrollDescriptionDown();
virtual void updateHighlightAndScrollPositions();

View file

@ -2,7 +2,7 @@
#include "UI.h"
#include "UIScene_DebugOptions.h"
LPCWSTR UIScene_DebugOptionsMenu::m_DebugCheckboxTextA[eDebugSetting_Max+1]=
const wchar_t *UIScene_DebugOptionsMenu::m_DebugCheckboxTextA[eDebugSetting_Max+1]=
{
L"Load Saves From Local Folder Mode",
L"Write Saves To Local Folder Mode",

View file

@ -6,7 +6,7 @@
class UIScene_DebugOptionsMenu : public UIScene
{
private:
static LPCWSTR m_DebugCheckboxTextA[eDebugSetting_Max+1];
static const wchar_t *m_DebugCheckboxTextA[eDebugSetting_Max+1];
int m_iTotalCheckboxElements;