sets the background bitmap for a specified button state
| 163 | |
| 164 | // sets the background bitmap for a specified button state |
| 165 | void UIButton::SetStateItem(int state, UIItem *item) { |
| 166 | ASSERT(state < UI_BTS_NUM); |
| 167 | if (m_Items[state]) { |
| 168 | delete m_Items[state]; |
| 169 | m_Items[state] = NULL; |
| 170 | } |
| 171 | if (item) |
| 172 | m_Items[state] = item->CopyUIItem(); |
| 173 | } |
| 174 | |
| 175 | // sets the background color for a specified button state |
| 176 | void UIButton::SetColor(int state, ddgr_color col) { |