3 override void HandlerAttached(Widget w)
12 Widget slot = w.GetChildren();
16 if (SizeLayoutWidget.Cast(slot))
18 OverlayWidget overlay = OverlayWidget.Cast(
GetGame().GetWorkspace().CreateWidget(WidgetType.OverlayWidgetTypeID, WidgetFlags.VISIBLE,
new Color(1,1,1,1), 0, slot));
19 SizeLayoutSlot.SetHorizontalAlign(overlay, LayoutHorizontalAlign.Stretch);
20 SizeLayoutSlot.SetVerticalAlign(overlay, LayoutHorizontalAlign.Stretch);
22 ImageWidget img = ImageWidget.Cast(
GetGame().GetWorkspace().CreateWidget(WidgetType.ImageWidgetTypeID, WidgetFlags.VISIBLE,
new Color(Math.RandomFloat(0,0.8),Math.RandomFloat(0,0.8),Math.RandomFloat(0,0.8),1), 0, overlay));
23 OverlaySlot.SetHorizontalAlign(img, LayoutHorizontalAlign.Stretch);
24 OverlaySlot.SetVerticalAlign(img, LayoutHorizontalAlign.Stretch);
26 TextWidget text = TextWidget.Cast(
GetGame().GetWorkspace().CreateWidget(WidgetType.TextWidgetTypeID, WidgetFlags.VISIBLE,
new Color(1,1,1,1), 0, overlay));
27 text.SetText(slot.GetName());
28 text.SetFont(
"{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt");
29 text.SetExactFontSize(18);
32 slot = slot.GetSibling();