------------------------------------------------------------------------------
| 1045 | |
| 1046 | //------------------------------------------------------------------------------ |
| 1047 | void GuiPopUpMenuCtrlEx::onRender(Point2I offset, const RectI &updateRect) |
| 1048 | { |
| 1049 | TORQUE_UNUSED(updateRect); |
| 1050 | Point2I localStart; |
| 1051 | |
| 1052 | if ( mScrollDir != GuiScrollCtrl::None ) |
| 1053 | autoScroll(); |
| 1054 | |
| 1055 | GFXDrawUtil* drawUtil = GFX->getDrawUtil(); |
| 1056 | |
| 1057 | RectI r( offset, getExtent() ); |
| 1058 | if ( mInAction ) |
| 1059 | { |
| 1060 | S32 l = r.point.x, r2 = r.point.x + r.extent.x - 1; |
| 1061 | S32 t = r.point.y, b = r.point.y + r.extent.y - 1; |
| 1062 | |
| 1063 | // Do we render a bitmap border or lines? |
| 1064 | if ( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() ) |
| 1065 | { |
| 1066 | // Render the fixed, filled in border |
| 1067 | renderFixedBitmapBordersFilled(r, 3, mProfile ); |
| 1068 | |
| 1069 | } |
| 1070 | else |
| 1071 | { |
| 1072 | //renderSlightlyLoweredBox(r, mProfile); |
| 1073 | drawUtil->drawRectFill( r, mProfile->mFillColor ); |
| 1074 | } |
| 1075 | |
| 1076 | // Draw a bitmap over the background? |
| 1077 | if ( mBitmap[Depressed] ) |
| 1078 | { |
| 1079 | RectI rect(offset, mBitmapBounds); |
| 1080 | drawUtil->clearBitmapModulation(); |
| 1081 | drawUtil->drawBitmapStretch(mBitmap[Depressed], rect ); |
| 1082 | } |
| 1083 | else if (mBitmap[Normal]) |
| 1084 | { |
| 1085 | RectI rect(offset, mBitmapBounds); |
| 1086 | drawUtil->clearBitmapModulation(); |
| 1087 | drawUtil->drawBitmapStretch(mBitmap[Normal], rect ); |
| 1088 | } |
| 1089 | |
| 1090 | // Do we render a bitmap border or lines? |
| 1091 | if ( !( mProfile->getChildrenProfile() && mProfile->mBitmapArrayRects.size() ) ) |
| 1092 | { |
| 1093 | drawUtil->drawLine( l, t, l, b, colorWhite ); |
| 1094 | drawUtil->drawLine( l, t, r2, t, colorWhite ); |
| 1095 | drawUtil->drawLine( l + 1, b, r2, b, mProfile->mBorderColor ); |
| 1096 | drawUtil->drawLine( r2, t + 1, r2, b - 1, mProfile->mBorderColor ); |
| 1097 | } |
| 1098 | |
| 1099 | } |
| 1100 | else |
| 1101 | // TODO: Implement |
| 1102 | // TODO: Add onMouseEnter() and onMouseLeave() and a definition of mMouseOver (see guiButtonBaseCtrl) for this to work. |
| 1103 | if ( mMouseOver ) |
| 1104 | { |
nothing calls this directly
no test coverage detected