| 200 | } |
| 201 | |
| 202 | void GuiIconButtonCtrl::setBitmap(const char *name) |
| 203 | { |
| 204 | mBitmapName = StringTable->insert(name); |
| 205 | if(!isAwake()) |
| 206 | return; |
| 207 | |
| 208 | if (*mBitmapName) |
| 209 | { |
| 210 | mTextureNormal = GFXTexHandle( name, &GFXDefaultPersistentProfile, avar("%s() - mTextureNormal (line %d)", __FUNCTION__, __LINE__) ); |
| 211 | } |
| 212 | else |
| 213 | { |
| 214 | mTextureNormal = NULL; |
| 215 | } |
| 216 | |
| 217 | // So that extent is recalculated if autoSize is set. |
| 218 | resize( getPosition(), getExtent() ); |
| 219 | |
| 220 | setUpdate(); |
| 221 | } |
| 222 | |
| 223 | void GuiIconButtonCtrl::onRender(Point2I offset, const RectI& updateRect) |
| 224 | { |
no test coverage detected