diff options
author | Peter Kohaut | 2017-08-24 23:43:47 +0200 |
---|---|---|
committer | Peter Kohaut | 2017-08-24 23:43:47 +0200 |
commit | 0da18320af79b6ca8a47248442d106674b5ab860 (patch) | |
tree | 504d769edcf92fc4cbceddfbcdda038ecc040ced /engines/bladerunner/ui_image_picker.h | |
parent | c9b4089ccb0b60389446e07f7f9421e3a7180129 (diff) | |
download | scummvm-rg350-0da18320af79b6ca8a47248442d106674b5ab860.tar.gz scummvm-rg350-0da18320af79b6ca8a47248442d106674b5ab860.tar.bz2 scummvm-rg350-0da18320af79b6ca8a47248442d106674b5ab860.zip |
BLADERUNNER: Added audio mixer & various fixes
Audio mixer is supporting fading and pan animation
Added support for skipping speech by pressing Return
Added proper support for ambient sounds
Added more code to the dialogue menu
Added tooltips to the Spinner
Fixed calculation of volume and pan of walk steps
Code cleanup & formatting
Diffstat (limited to 'engines/bladerunner/ui_image_picker.h')
-rw-r--r-- | engines/bladerunner/ui_image_picker.h | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/engines/bladerunner/ui_image_picker.h b/engines/bladerunner/ui_image_picker.h index c55aa48a64..c06b556c14 100644 --- a/engines/bladerunner/ui_image_picker.h +++ b/engines/bladerunner/ui_image_picker.h @@ -23,6 +23,10 @@ #ifndef BLADERUNNER_UI_IMAGE_PICKER_H #define BLADERUNNER_UI_IMAGE_PICKER_H +#include "common/array.h" +#include "common/rect.h" +#include "common/str.h" + namespace Graphics { struct Surface; } @@ -31,10 +35,18 @@ namespace BladeRunner { class BladeRunnerEngine; class Shape; -struct UIImagePickerImage; typedef void UIImagePickerCallback(int, void*); +struct UIImagePickerImage { + int active; + Common::Rect rect; + Shape *shapeUp; + Shape *shapeHovered; + Shape *shapeDown; + Common::String tooltip; +}; + class UIImagePicker { BladeRunnerEngine *_vm; @@ -42,9 +54,9 @@ class UIImagePicker { int _imageCount; int _hoveredImageIndex; int _pressedImageIndex; - int _hoverStartTimestamp; + uint32 _hoverStartTimestamp; int _isButtonDown; - UIImagePickerImage *_images; + Common::Array<UIImagePickerImage> _images; UIImagePickerCallback *_mouseInCallback; UIImagePickerCallback *_mouseOutCallback; @@ -57,7 +69,7 @@ public: ~UIImagePicker(); void resetImages(); - bool defineImage(int i, int left, int top, int right, int bottom, Shape *shapeUp, Shape *shapeHovered, Shape *shapeDown, const char *tooltip); + bool defineImage(int i, Common::Rect rect, Shape *shapeUp, Shape *shapeHovered, Shape *shapeDown, const char *tooltip); bool setImageTop(int i, int top); bool setImageLeft(int i, int left); @@ -68,16 +80,16 @@ public: bool resetActiveImage(int i); - void setCallbacks(UIImagePickerCallback *mouseInCallback, - UIImagePickerCallback *mouseOutCallback, - UIImagePickerCallback *mouseDownCallback, - UIImagePickerCallback *mouseUpCallback, - void *callbackData); + void activate(UIImagePickerCallback *mouseInCallback, + UIImagePickerCallback *mouseOutCallback, + UIImagePickerCallback *mouseDownCallback, + UIImagePickerCallback *mouseUpCallback, + void *callbackData); - void resetCallbacks(); + void deactivate(); - void drawTooltip(); void draw(Graphics::Surface &surface); + void drawTooltip(Graphics::Surface &surface, int x, int y); void handleMouseAction(int x, int y, bool down, bool up, bool ignore = false); |