8 protected ResourceName m_WarningIcon;
11 protected string m_sTextWidgetName;
14 protected string m_sWarningTextName;
17 protected string m_sWarningImageName;
19 protected TextWidget m_Text;
20 protected TextWidget m_WarningText;
21 protected ImageWidget m_WarningImage;
26 m_Text = TextWidget.Cast(widget.FindAnyWidget(m_sTextWidgetName));
30 m_WarningText = TextWidget.Cast(widget.FindAnyWidget(m_sWarningTextName));
34 m_WarningText.SetText(m_sWarningText);
36 m_WarningImage = ImageWidget.Cast(widget.FindAnyWidget(m_sWarningImageName));
39 if (m_WarningIcon !=
string.Empty)
41 m_WarningImage.LoadImageTexture(0, m_WarningIcon);
42 m_WarningImage.SetImage(0);
46 m_WarningImage.SetVisible(
false);
56 void ToggleWarning(
bool showWarning)
58 if (m_WarningImage && m_WarningIcon !=
string.Empty)
59 m_WarningImage.SetVisible(showWarning);
62 m_WarningText.SetVisible(showWarning);
64 m_Text.SetVisible(!showWarning);