| 130 | } |
| 131 | |
| 132 | void CUITaskRootItem::Update() |
| 133 | { |
| 134 | inherited::Update(); |
| 135 | |
| 136 | if (m_curr_descr_mode != m_EventsWnd->GetDescriptionMode()) |
| 137 | { |
| 138 | m_curr_descr_mode = m_EventsWnd->GetDescriptionMode(); |
| 139 | if (m_curr_descr_mode) |
| 140 | m_switchDescriptionBtn->InitTexture("ui_icons_newPDA_showtext"); |
| 141 | else |
| 142 | m_switchDescriptionBtn->InitTexture("ui_icons_newPDA_showmap"); |
| 143 | } |
| 144 | |
| 145 | m_switchDescriptionBtn->SetButtonMode(m_EventsWnd->GetDescriptionMode() ? CUIButton::BUTTON_NORMAL : CUIButton::BUTTON_PUSHED); |
| 146 | |
| 147 | if (m_remTimeStatic->IsShown()) |
| 148 | { |
| 149 | string512 buff, buff2; |
| 150 | InventoryUtilities::GetTimePeriodAsString(buff, sizeof(buff), Level().GetGameTime(), GameTask()->m_TimeToComplete); |
| 151 | sprintf_s(buff2, "%s %s", *CStringTable().translate("ui_st_time_remains"), buff); |
| 152 | m_remTimeStatic->SetText(buff2); |
| 153 | } |
| 154 | } |
| 155 | |
| 156 | bool CUITaskRootItem::OnDbClick() { return true; } |
| 157 |
nothing calls this directly
no test coverage detected