33 layoutRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/credits/credits_menu.layout",
null);
34 m_Logo =
ImageWidget.Cast(layoutRoot.FindAnyWidget(
"Logo"));
35 m_Scroller =
ScrollWidget.Cast(layoutRoot.FindAnyWidget(
"CreditsPanel"));
36 m_Content =
WrapSpacerWidget.Cast(layoutRoot.FindAnyWidget(
"CreditsContent"));
37 m_InfoPanelText =
RichTextWidget.Cast(layoutRoot.FindAnyWidget(
"InfoPanelText"));
38 m_InfoPanel = layoutRoot.FindAnyWidget(
"InfoPanel");
42 m_MenuFadeInIncrement = 1 / MENU_FADEIN_TIME;
43 m_LogoFadeInIncrement = 1 / LOGO_FADEIN_TIME;
44 m_ScrollIncrement = CREDIT_SCROLL_SPEED * (
y / 1080);
46 m_Scroller.VScrollToPos01(0);
47 m_Scroller.GetScreenSize(
x_f, m_ScrollSize);
49 GetGame().GameScript.Call(
this,
"LoadDataAsync",
null);
70 if (m_LogoFadeInLevel != 1)
76 m_MenuFadeInLevel = 1;
78 if (m_MenuFadeInLevel > 0.5)
84 m_LogoFadeInLevel = 1;
87 layoutRoot.SetAlpha(m_MenuFadeInLevel);
88 m_Logo.SetAlpha(m_LogoFadeInLevel);
89 m_InfoPanelText.SetAlpha(m_MenuFadeInLevel);
91 else if (m_ScrollLevel + m_ScrollSize <= m_Scroller.GetContentHeight())
95 m_Scroller.VScrollToPos(m_ScrollLevel);
105 layoutRoot.SetAlpha(m_MenuFadeInLevel2);
106 m_InfoPanelText.SetAlpha(m_MenuFadeInLevel2);