Added: getSheetLocalizedName and getSheetLocalizedDesc lua bind

Changed: DIV get now id with base the id of the html group

--HG--
branch : compatibility-develop
hg/compatibility-develop
ulukyn 7 years ago
parent 7dd56d06d0
commit 455ee32bd5

@ -1591,10 +1591,10 @@ namespace NLGUI
parentId = _Paragraph->getId(); parentId = _Paragraph->getId();
} }
CInterfaceGroup *inst = CWidgetManager::getInstance()->getParser()->createGroupInstance(templateName, parentId+":"+id, tmplParams); CInterfaceGroup *inst = CWidgetManager::getInstance()->getParser()->createGroupInstance(templateName, this->_Id+":"+id, tmplParams);
if (inst) if (inst)
{ {
inst->setId(parentId+":"+id); inst->setId(this->_Id+":"+id);
inst->updateCoords(); inst->updateCoords();
if (haveParentDiv) if (haveParentDiv)
{ {

@ -527,6 +527,8 @@ void CLuaIHMRyzom::RegisterRyzomFunctions(NLGUI::CLuaState &ls)
LUABIND_FUNC(getPlayerSelectedSlot), LUABIND_FUNC(getPlayerSelectedSlot),
LUABIND_FUNC(isInGame), LUABIND_FUNC(isInGame),
LUABIND_FUNC(isPlayerSlotNewbieLand), LUABIND_FUNC(isPlayerSlotNewbieLand),
LUABIND_FUNC(getSheetLocalizedName),
LUABIND_FUNC(getSheetLocalizedDesc),
LUABIND_FUNC(getSkillIdFromName), LUABIND_FUNC(getSkillIdFromName),
LUABIND_FUNC(getSkillLocalizedName), LUABIND_FUNC(getSkillLocalizedName),
LUABIND_FUNC(getMaxSkillValue), LUABIND_FUNC(getMaxSkillValue),
@ -3106,6 +3108,20 @@ bool CLuaIHMRyzom::isPlayerSlotNewbieLand(uint32 slot)
return CharacterSummaries[slot].InNewbieland; return CharacterSummaries[slot].InNewbieland;
} }
// ***************************************************************************
ucstring CLuaIHMRyzom::getSheetLocalizedName(const std::string &sheet)
{
return ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedName(CSheetId(sheet)));
}
// ***************************************************************************
ucstring CLuaIHMRyzom::getSheetLocalizedDesc(const std::string &sheet)
{
return ucstring(STRING_MANAGER::CStringManagerClient::getItemLocalizedDescription(CSheetId(sheet)));
}
// *************************************************************************** // ***************************************************************************
sint32 CLuaIHMRyzom::getSkillIdFromName(const std::string &def) sint32 CLuaIHMRyzom::getSkillIdFromName(const std::string &def)
{ {

@ -178,6 +178,8 @@ private:
static bool isPlayerSlotNewbieLand(uint32 slot); // test if one of the player slot is a newbieland one, if not so, client must be patched in order to continue static bool isPlayerSlotNewbieLand(uint32 slot); // test if one of the player slot is a newbieland one, if not so, client must be patched in order to continue
// GameInfo // GameInfo
static ucstring getSheetLocalizedName(const std::string &sheet);
static ucstring getSheetLocalizedDesc(const std::string &sheet);
static sint32 getSkillIdFromName(const std::string &def); static sint32 getSkillIdFromName(const std::string &def);
static ucstring getSkillLocalizedName(sint32 skillId); static ucstring getSkillLocalizedName(sint32 skillId);
static sint32 getMaxSkillValue(sint32 skillId); static sint32 getMaxSkillValue(sint32 skillId);

Loading…
Cancel
Save