| 45 | #include "../string_table.h" |
| 46 | |
| 47 | void CUIDebugFonts::FillUpList() |
| 48 | { |
| 49 | CFontManager::FONTS_VEC& v = UI()->Font()->m_all_fonts; |
| 50 | CFontManager::FONTS_VEC_IT it = v.begin(); |
| 51 | CFontManager::FONTS_VEC_IT it_e = v.end(); |
| 52 | Fvector2 pos, sz; |
| 53 | pos.set(0, 0); |
| 54 | sz.set(UI_BASE_WIDTH, UI_BASE_HEIGHT); |
| 55 | string256 str; |
| 56 | for (; it != it_e; ++it) |
| 57 | { |
| 58 | CGameFont* F = *(*it); |
| 59 | CUIStatic* pItem = xr_new<CUIStatic>(); |
| 60 | pItem->SetWndPos(pos); |
| 61 | pItem->SetWndSize(sz); |
| 62 | sprintf_s(str, "%s:%s", *F->m_font_name, *CStringTable().translate("Test_Font_String")); |
| 63 | pItem->SetFont(F); |
| 64 | pItem->SetText(str); |
| 65 | pItem->SetTextComplexMode(false); |
| 66 | pItem->SetVTextAlignment(valCenter); |
| 67 | pItem->SetTextAlignment(CGameFont::alCenter); |
| 68 | pItem->AdjustHeightToText(); |
| 69 | pos.y += pItem->GetHeight() + 20.0f; |
| 70 | pItem->SetAutoDelete(true); |
| 71 | AttachChild(pItem); |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | #endif |
nothing calls this directly
no test coverage detected