| 137 | } |
| 138 | |
| 139 | void CUIButton::DrawTexture() |
| 140 | { |
| 141 | Frect rect; |
| 142 | GetAbsoluteRect(rect); |
| 143 | |
| 144 | if (m_bAvailableTexture && m_bTextureEnable) |
| 145 | { |
| 146 | if (m_eButtonState == BUTTON_UP || m_eButtonState == BUTTON_NORMAL) |
| 147 | m_UIStaticItem.SetPos(rect.left + m_TextureOffset.x, rect.top + m_TextureOffset.y); |
| 148 | else |
| 149 | m_UIStaticItem.SetPos(rect.left + m_PushOffset.x + m_TextureOffset.x, rect.top + m_PushOffset.y + m_TextureOffset.y); |
| 150 | |
| 151 | if (m_bStretchTexture) |
| 152 | m_UIStaticItem.SetRect(0, 0, rect.width(), rect.height()); |
| 153 | else |
| 154 | { |
| 155 | Frect r = {0, 0, m_UIStaticItem.GetOriginalRectScaled().width(), m_UIStaticItem.GetOriginalRectScaled().height()}; |
| 156 | m_UIStaticItem.SetRect(r); |
| 157 | } |
| 158 | |
| 159 | if (Heading()) |
| 160 | m_UIStaticItem.Render(GetHeading()); |
| 161 | else |
| 162 | m_UIStaticItem.Render(); |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | void CUIButton::DrawHighlightedText() |
| 167 | { |
nothing calls this directly
no test coverage detected