Посмотрите видео ниже, чтобы узнать, как установить наш сайт в виде веб-приложения на главном экране.
Примечание: Эта функция может быть недоступна в некоторых браузерах.
m_ClassIcon[idx].SetTexture("Icon.ClassIcon_" $ info.nSubClass);
if (isLeader[idx] == 1)
{
ParseInt(param, "RoutingType", RoutingType);
m_PlayerName[idx].SetNameWithColor(Name, NCT_Normal,TA_Center,LeaderNameColor);
m_ClassIcon[idx].SetTexture(GetClassIconCustom(ClassID));
m_ClassIcon[idx].SetTextureSize(32,32);
m_ClassIcon[idx].SetWindowSize(14,14);
m_ClassIconCustom[idx].SetTextureSize(32,32);
m_ClassIconCustom[idx].SetWindowSize(14,14);
m_ClassIconCustom[idx].SetTooltipCustomType(MakeTooltipSimpleText(GetClassType(ClassID)@"(Lv."@Level@")"@GetRoutingString(RoutingType)));
}
else
{
m_PlayerName[idx].SetName(Name, NCT_Normal,TA_Center);
m_PartyStatus[idx].SetTooltipCustomType(MakeTooltipSimpleText("Lv" $ Level $ " - " $ GetClassType(ClassID)));
m_ClassIcon[idx].SetTexture(GetClassIconCustom(ClassID));
m_ClassIcon[idx].SetTextureSize(32,32);
m_ClassIcon[idx].SetWindowSize(14,14);
m_ClassIconCustom[idx].SetTextureSize(32,32);
m_ClassIconCustom[idx].SetWindowSize(14,14);
m_ClassIconCustom[idx].SetTooltipCustomType(MakeTooltipSimpleText(GetClassType(ClassID)@"(Lv."@Level@")"));
}
function string GetClassIconCustom(int ClassIDCustom)
{
local string tempString;
tempString = "";
switch (ClassIDCustom)
{
case 0:
tempString = "Icon.skill0003";
break;
case 1:
tempString = "Icon.skill0001";
break;
case 2:
tempString = "Icon.skill0001";
break;
case 3:
tempString = "Icon.skill0452";
break;
case 4:
tempString = "Icon.skill0092";
break;
case 5:
tempString = "Icon.skill0092";
break;
case 6:
tempString = "Icon.skill0092";
break;
case 7:
tempString = "Icon.skill0016";
break;
case 8:
m_ClassIcon[idx].SetTexture("Icon.ClassIcon_" $ info.nSubClass);
Спасибо за ответ, уже начал пробовать)Интерфейс, как пример вешают кастомный тултип с картинкой по типу:
C++:if (isLeader[idx] == 1) { ParseInt(param, "RoutingType", RoutingType); m_PlayerName[idx].SetNameWithColor(Name, NCT_Normal,TA_Center,LeaderNameColor); m_ClassIcon[idx].SetTexture(GetClassIconCustom(ClassID)); m_ClassIcon[idx].SetTextureSize(32,32); m_ClassIcon[idx].SetWindowSize(14,14); m_ClassIconCustom[idx].SetTextureSize(32,32); m_ClassIconCustom[idx].SetWindowSize(14,14); m_ClassIconCustom[idx].SetTooltipCustomType(MakeTooltipSimpleText(GetClassType(ClassID)@"(Lv."@Level@")"@GetRoutingString(RoutingType))); } else { m_PlayerName[idx].SetName(Name, NCT_Normal,TA_Center); m_PartyStatus[idx].SetTooltipCustomType(MakeTooltipSimpleText("Lv" $ Level $ " - " $ GetClassType(ClassID))); m_ClassIcon[idx].SetTexture(GetClassIconCustom(ClassID)); m_ClassIcon[idx].SetTextureSize(32,32); m_ClassIcon[idx].SetWindowSize(14,14); m_ClassIconCustom[idx].SetTextureSize(32,32); m_ClassIconCustom[idx].SetWindowSize(14,14); m_ClassIconCustom[idx].SetTooltipCustomType(MakeTooltipSimpleText(GetClassType(ClassID)@"(Lv."@Level@")")); }
А в UICommonAPI уже задают их:
C++:function string GetClassIconCustom(int ClassIDCustom) { local string tempString; tempString = ""; switch (ClassIDCustom) { case 0: tempString = "Icon.skill0003"; break; case 1: tempString = "Icon.skill0001"; break; case 2: tempString = "Icon.skill0001"; break; case 3: tempString = "Icon.skill0452"; break; case 4: tempString = "Icon.skill0092"; break; case 5: tempString = "Icon.skill0092"; break; case 6: tempString = "Icon.skill0092"; break; case 7: tempString = "Icon.skill0016"; break; case 8:
Спасиб за ответ!делаешь несколько текстурок в паке, присваиваешь им индекс в соотв. с классом, например ClassIcon_13 (некр)
ну, а потом в интерфейсе устанавливаешь текстуру исходя из класса игрока:
C#:m_ClassIcon[idx].SetTexture("Icon.ClassIcon_" $ info.nSubClass);
ну и клиент просто подтягивает нужную текстуру под класс игрока