| 553 | //------------------------------------------------------------------------------ |
| 554 | |
| 555 | void GuiBitmapButtonCtrl::renderButton( GFXTexHandle &texture, const Point2I &offset, const RectI& updateRect ) |
| 556 | { |
| 557 | GFX->getDrawUtil()->clearBitmapModulation(); |
| 558 | GFX->getDrawUtil()->setBitmapModulation(mColor); |
| 559 | |
| 560 | switch( mBitmapMode ) |
| 561 | { |
| 562 | case BitmapStretched: |
| 563 | { |
| 564 | RectI rect( offset, getExtent() ); |
| 565 | GFX->getDrawUtil()->drawBitmapStretch( texture, rect ); |
| 566 | break; |
| 567 | } |
| 568 | |
| 569 | case BitmapCentered: |
| 570 | { |
| 571 | Point2I p = offset; |
| 572 | |
| 573 | p.x += getExtent().x / 2 - texture.getWidth() / 2; |
| 574 | p.y += getExtent().y / 2 - texture.getHeight() / 2; |
| 575 | |
| 576 | GFX->getDrawUtil()->drawBitmap( texture, p ); |
| 577 | break; |
| 578 | } |
| 579 | } |
| 580 | } |
| 581 | |
| 582 | //============================================================================= |
| 583 | // GuiBitmapButtonTextCtrl. |
nothing calls this directly
no test coverage detected