10 protected TextWidget m_ClockTimeText;
15 protected void OnSystemClockUpdate()
18 int hour, minute, sec;
19 System.GetHourMinuteSecond(hour, minute, sec);
22 m_ClockTimeText.SetText(
SCR_FormatHelper.GetTimeFormattingHoursMinutes(hour, minute));
28 override void HandlerAttached(Widget w)
30 m_ClockTimeText = TextWidget.Cast(w);
35 OnSystemClockUpdate();
36 GetGame().GetCallqueue().CallLater(OnSystemClockUpdate, 1000,
true);
40 Print(
"System Clock not attached to Text Widget!", LogLevel.ERROR);
46 override void HandlerDeattached(Widget w)
51 GetGame().GetCallqueue().Remove(OnSystemClockUpdate);