4 private string m_sWatermarkWidgetName;
7 private string m_sVersionTextWidgetName;
9 private Widget m_wRoot;
10 private Widget m_wLayoutRoot;
13 override void HandlerAttached(Widget w)
16 m_wLayoutRoot =
m_wRoot.GetParent();
18 m_wLayoutRoot.SetVisible(
false);
20 TextWidget wWatermark = TextWidget.Cast(w.FindAnyWidget(m_sWatermarkWidgetName));
21 TextWidget wVersion = TextWidget.Cast(w.FindAnyWidget(m_sVersionTextWidgetName));
23 if (!wWatermark || !wVersion)
26 PlatformService platformService =
GetGame().GetPlatformService();
31 PlatformKind platformID = platformService.GetLocalPlatformKind();
37 string buildName =
"";
39 if (
GetGame().IsExperimentalBuild())
41 buildName =
"#AR-Experimental_WelcomeLabel";
43 else if (platformID == 0)
45 buildName =
"#AR-Watermark_Development";
48 wWatermark.SetText(buildName);
51 string version =
GetGame().GetBuildVersion();
53 array <string> platformStrings =
61 if (platformID < platformStrings.Count())
63 string platformSuffix = WidgetManager.Translate(platformStrings[platformID]);
65 if (platformSuffix !=
"")
66 version =
string.Format(
"%1 (%2)", version, platformSuffix);
70 wVersion.SetText(version);
71 m_wLayoutRoot.SetVisible(
true);