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

◆ GetButtonLabel()

string GetButtonLabel ( string color)
protected

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

545 {
546 string shopLabel;
547 #ifdef PLATFORM_WINDOWS
548 shopLabel = "#dlc_open_store";
549 #endif
550
551 #ifdef PLATFORM_CONSOLE
552 #ifdef PLATFORM_MSSTORE
553 shopLabel = "#dlc_open_store_Xbox";
554 #else
555 #ifdef PLATFORM_XBOX
556 shopLabel = "#dlc_open_store_Xbox";
557 #else
558 shopLabel = "#dlc_open_store_PS";
559 #endif
560 #endif
561 #endif
562
564 {
565 switch (m_CurrentArticle.categoryID)
566 {
567 case NewsCategory.DLC_PROMO:
568 {
569 if (m_CurrentArticle.fullUrl != string.Empty)
570 {
571 shopLabel = "#dlc_news_wishlist";
572 }
573 else
574 {
575 shopLabel = "#dlc_news_comingsoon";
576 }
577 break;
578 }
579 case NewsCategory.MISC_PROMO:
580 {
581 shopLabel = "#dlc_news_learn_more";
582 break;
583 }
584 }
585 }
586
587 string label = shopLabel;
588 string linkIcon = string.Format("<image set=\"%1\" name=\"%2\" scale=\"%3\"/>", "dayz_gui", "externallink", 0.9);
589
590 if (m_CurrentInputDevice == EInputDeviceType.CONTROLLER && m_CurrentArticle && m_CurrentArticle.fullUrl != string.Empty)
591 {
592 label = string.Format("#dlc_news_hold %1%2", InputUtils.GetRichtextButtonIconFromInputAction("UAUICtrlX", "", EUAINPUT_DEVICE_CONTROLLER, 1.2), shopLabel);
593 }
594
595 string fullLabel = string.Format("<color rgba=\"%1\">%2 %3</color>", color, label, linkIcon);
596 if (m_CurrentArticle && m_CurrentArticle.fullUrl == string.Empty)
597 fullLabel = string.Format("<color rgba=\"%1\">%2</color>", color, label);
598
599 return fullLabel;
600 }
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().