DayZ 1.30
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ GetButtonLabel()

string GetButtonLabel ( string color)
protected

См. определение в файле NewsCarousel.c строка 577

578 {
579 string shopLabel;
580 #ifdef PLATFORM_WINDOWS
581 shopLabel = "#dlc_open_store";
582 #endif
583
584 #ifdef PLATFORM_CONSOLE
585 #ifdef PLATFORM_MSSTORE
586 shopLabel = "#dlc_open_store_Xbox";
587 #else
588 #ifdef PLATFORM_XBOX
589 shopLabel = "#dlc_open_store_Xbox";
590 #else
591 shopLabel = "#dlc_open_store_PS";
592 #endif
593 #endif
594 #endif
595
597 {
598 switch (m_CurrentArticle.categoryID)
599 {
600 case NewsCategory.DLC_PROMO:
601 {
602 if (m_CurrentArticle.fullUrl != string.Empty)
603 {
604 shopLabel = "#dlc_news_wishlist";
605 }
606 else
607 {
608 shopLabel = "#dlc_news_comingsoon";
609 }
610 break;
611 }
612 case NewsCategory.MISC_PROMO:
613 {
614 shopLabel = "#dlc_news_learn_more";
615 break;
616 }
617 }
618 }
619
620 string label = shopLabel;
621 string linkIcon = string.Format("<image set=\"%1\" name=\"%2\" scale=\"%3\"/>", "dayz_gui", "externallink", 0.9);
622
623 if (m_CurrentInputDevice == EInputDeviceType.CONTROLLER && m_CurrentArticle && m_CurrentArticle.fullUrl != string.Empty)
624 {
625 label = string.Format("#dlc_news_hold %1%2", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlX", "", EUAINPUT_DEVICE_CONTROLLER, 1.2), shopLabel);
626 }
627
628 string fullLabel = string.Format("<color rgba=\"%1\">%2 %3</color>", color, label, linkIcon);
629 if (m_CurrentArticle && m_CurrentArticle.fullUrl == string.Empty)
630 fullLabel = string.Format("<color rgba=\"%1\">%2</color>", color, label);
631
632 return fullLabel;
633 }
static string GetRichtextButtonIconFromInputAction(notnull UAInput pInput, string pLocalizedDescription, int pInputDeviceType=EUAINPUT_DEVICE_CONTROLLER, float pScale=ICON_SCALE_NORMAL, bool pVertical=false)
Определения InputUtils.c:167
Определения InputUtils.c:2
static proto string Format(string fmt, void param1=NULL, void param2=NULL, void param3=NULL, void param4=NULL, void param5=NULL, void param6=NULL, void param7=NULL, void param8=NULL, void param9=NULL)
Gets n-th character from string.
EInputDeviceType
Определения input.c:3

Перекрестные ссылки string::Format(), InputUtils::GetRichtextButtonIconFromInputAction(), m_CurrentArticle и m_CurrentInputDevice.

Используется в NewsCarousel(), OnAnimationCompleted(), OnInputDeviceChanged(), OnMouseEnter() и OnMouseLeave().