Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SlotLabelsComponent.c
Go to the documentation of this file.
1 class SCR_SlotLabelsComponent : ScriptedWidgetComponent
2 {
3  override void HandlerAttached(Widget w)
4  {
5  #ifdef WORKBENCH
6  Game g = GetGame();
7  GenericEntity world = GetGame().GetWorldEntity();
8 
9  if (world)
10  return;
11 
12  Widget child = w.GetChildren();
13 
14  while (child)
15  {
16  if (OverlayWidget.Cast(child))
17  {
18  TextWidget text = TextWidget.Cast(GetGame().GetWorkspace().CreateWidget(WidgetType.TextWidgetTypeID, WidgetFlags.VISIBLE, new Color(1,1,1,1), 0, child));
19  text.SetText(child.GetName());
20  text.SetFont("{3E7733BAC8C831F6}UI/Fonts/RobotoCondensed/RobotoCondensed_Regular.fnt");
21  text.SetExactFontSize(18);
22  }
23 
24  child = child.GetSibling();
25  }
26  #endif
27  }
28 };
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
GenericEntity
SCR_GenericBoxEntityClass GenericEntity
SCR_SlotLabelsComponent
Definition: SCR_SlotLabelsComponent.c:1