5 protected Widget m_BannerBody;
6 protected Widget m_BannerWedge;
9 void BannerHandlerBase(
Widget parent)
12 m_Root =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/new_ui/dlc_panels/BannerTemplate.layout",
m_Parent);
15 m_BannerBody =
m_Root.FindAnyWidget(
"BadgeBody");
16 m_BannerWedge =
m_Root.FindAnyWidget(
"BadgeWedge");
19 m_BannerBody.SetAlpha(1.0);
20 m_BannerWedge.SetAlpha(1.0);
23 void SetBannerColor(
int argb)
25 m_BannerBody.SetColor(argb);
26 m_BannerWedge.SetColor(argb);
29 void SetBannerText(
string text)
31 m_BannerText.SetText(text);
36 if (w == m_BannerText)
39 m_BannerText.GetScreenSize(w0,h0);
40 float bannerBodyWidth = w0 + 20;
42 m_BannerBody.SetScreenSize(bannerBodyWidth,h0);
43 m_BannerBody.GetScreenPos(x0,y0);
45 m_BannerWedge.GetScreenSize(w0,h0);
46 m_BannerWedge.SetScreenPos(
Math.Ceil(x0 - w0),y0);
49 return super.OnUpdate(w);