7 string m_sButtonIconName;
10 string m_sShortcutTextName;
12 private Widget m_RootWidget;
13 private ImageWidget m_ButtonIconWidget;
14 private TextWidget m_ShortcutTextWidget;
20 void SetData(
SCR_UIInfo info,
string shortcutAction,
bool canBePerformed)
23 buttonTextComponent.SetText(info.GetName());
24 buttonTextComponent.SetEnabled(canBePerformed);
25 info.SetIconTo(m_ButtonIconWidget);
26 SetShortcutText(shortcutAction);
30 protected void SetShortcutText(
string shortcutAction)
32 string shortcutText =
string.Empty;
33 if (shortcutAction !=
string.Empty)
35 shortcutText =
string.Format(
"<action name='%1'/>", shortcutAction);
38 m_ShortcutTextWidget.SetText(shortcutText);
42 override void HandlerAttached(Widget w)
45 m_ButtonIconWidget = ImageWidget.Cast(w.FindAnyWidget(m_sButtonIconName));
46 m_ShortcutTextWidget = TextWidget.Cast(w.FindAnyWidget(m_sShortcutTextName));