| 493 | //------------------------------------------------------------------------------ |
| 494 | |
| 495 | void GuiBitmapButtonCtrl::renderButton( GFXTexHandle &texture, const Point2I &offset, const RectI& updateRect ) |
| 496 | { |
| 497 | GFX->getDrawUtil()->clearBitmapModulation(); |
| 498 | |
| 499 | switch( mBitmapMode ) |
| 500 | { |
| 501 | case BitmapStretched: |
| 502 | { |
| 503 | RectI rect( offset, getExtent() ); |
| 504 | GFX->getDrawUtil()->drawBitmapStretch( texture, rect ); |
| 505 | break; |
| 506 | } |
| 507 | |
| 508 | case BitmapCentered: |
| 509 | { |
| 510 | Point2I p = offset; |
| 511 | |
| 512 | p.x += getExtent().x / 2 - texture.getWidth() / 2; |
| 513 | p.y += getExtent().y / 2 - texture.getHeight() / 2; |
| 514 | |
| 515 | GFX->getDrawUtil()->drawBitmap( texture, p ); |
| 516 | break; |
| 517 | } |
| 518 | } |
| 519 | } |
| 520 | |
| 521 | //============================================================================= |
| 522 | // GuiBitmapButtonTextCtrl. |
nothing calls this directly
no test coverage detected