| 29 | } |
| 30 | |
| 31 | void CListBox::DoHeader(const CUIRect *pRect, const char *pTitle, float HeaderHeight, float Spacing) |
| 32 | { |
| 33 | CUIRect View = *pRect; |
| 34 | CUIRect Header; |
| 35 | |
| 36 | // background |
| 37 | View.HSplitTop(HeaderHeight + Spacing, &Header, nullptr); |
| 38 | Header.Draw(ColorRGBA(0.0f, 0.0f, 0.0f, 0.15f), m_BackgroundCorners & IGraphics::CORNER_T, 5.0f); |
| 39 | |
| 40 | // draw header |
| 41 | View.HSplitTop(HeaderHeight, &Header, &View); |
| 42 | Ui()->DoLabel(&Header, pTitle, Header.h * CUi::ms_FontmodHeight * 0.8f, TEXTALIGN_MC); |
| 43 | |
| 44 | View.HSplitTop(Spacing, &Header, &View); |
| 45 | |
| 46 | // setup the variables |
| 47 | m_ListBoxView = View; |
| 48 | m_HasHeader = true; |
| 49 | } |
| 50 | |
| 51 | void CListBox::DoSpacing(float Spacing) |
| 52 | { |