diff options
Diffstat (limited to 'engines/wintermute/ui')
-rw-r--r-- | engines/wintermute/ui/ui_window.cpp | 10 | ||||
-rw-r--r-- | engines/wintermute/ui/ui_window.h | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/engines/wintermute/ui/ui_window.cpp b/engines/wintermute/ui/ui_window.cpp index e9308e052b..4c1068d366 100644 --- a/engines/wintermute/ui/ui_window.cpp +++ b/engines/wintermute/ui/ui_window.cpp @@ -142,7 +142,15 @@ bool UIWindow::display(int offsetX, int offsetY) { if (!_visible)
return STATUS_OK;
- if (_fadeBackground) _gameRef->_renderer->fadeToColor(_fadeColor);
+ if (_fadeBackground) {
+ Graphics::PixelFormat format = _gameRef->_renderer->getPixelFormat();
+ byte fadeR, fadeG, fadeB, fadeA;
+ // First convert from the internal format to the screen-format
+ uint32 fadeColor = format.ARGBToColor(RGBCOLGetA(_fadeColor), RGBCOLGetR(_fadeColor), RGBCOLGetG(_fadeColor), RGBCOLGetB(_fadeColor));
+ // Then get components
+ format.colorToARGB(fadeColor, fadeA, fadeR, fadeG, fadeB);
+ _gameRef->_renderer->fadeToColor(fadeR, fadeG, fadeB, fadeA);
+ }
if (_dragging) {
_posX += (_gameRef->_mousePos.x - _dragFrom.x);
diff --git a/engines/wintermute/ui/ui_window.h b/engines/wintermute/ui/ui_window.h index 9e8862471c..c2baeb1ea1 100644 --- a/engines/wintermute/ui/ui_window.h +++ b/engines/wintermute/ui/ui_window.h @@ -38,6 +38,7 @@ namespace WinterMute { class UIButton;
class BaseViewport;
class UIWindow : public UIObject {
+ uint32 _fadeColor;
public:
bool getWindowObjects(BaseArray<UIObject *, UIObject *> &Objects, bool InteractiveOnly);
@@ -49,7 +50,7 @@ public: bool _inGame;
bool _isMenu;
bool _fadeBackground;
- uint32 _fadeColor;
+
virtual bool handleMouseWheel(int delta);
UIWindow *_shieldWindow;
UIButton *_shieldButton;
|