| 191 | } |
| 192 | |
| 193 | void CUIDiaryWnd::OnSrcListItemClicked(CUIWindow* w, void* p) |
| 194 | { |
| 195 | CUITreeViewItem* pSelItem = (CUITreeViewItem*)p; |
| 196 | m_DescrView->Clear(); |
| 197 | if (!pSelItem->IsRoot()) |
| 198 | { |
| 199 | CUIEncyclopediaArticleWnd* article_info = xr_new<CUIEncyclopediaArticleWnd>(); |
| 200 | article_info->Init("encyclopedia_item.xml", "encyclopedia_wnd:objective_item"); |
| 201 | article_info->SetArticle(&m_ArticlesDB[pSelItem->GetValue()]); |
| 202 | m_DescrView->AddWindow(article_info, true); |
| 203 | |
| 204 | // Исправление отображения зеленым цветом прочитанных записей в дневнике КПК |
| 205 | if (!pSelItem->IsArticleReaded()) |
| 206 | { |
| 207 | if (Actor()->encyclopedia_registry->registry().objects_ptr()) |
| 208 | { |
| 209 | for (ARTICLE_VECTOR::iterator it = Actor()->encyclopedia_registry->registry().objects().begin(); it != Actor()->encyclopedia_registry->registry().objects().end(); |
| 210 | it++) |
| 211 | { |
| 212 | if (ARTICLE_DATA::eJournalArticle == it->article_type && m_ArticlesDB[pSelItem->GetValue()].Id() == it->article_id) |
| 213 | { |
| 214 | it->readed = true; |
| 215 | break; |
| 216 | } |
| 217 | } |
| 218 | } |
| 219 | } |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | void draw_sign(CUIStatic* s, Fvector2& pos); |
| 224 | void CUIDiaryWnd::Draw() |
nothing calls this directly
no test coverage detected