aboutsummaryrefslogtreecommitdiff
path: root/engines/sci/gfx
diff options
context:
space:
mode:
Diffstat (limited to 'engines/sci/gfx')
-rw-r--r--engines/sci/gfx/menubar.cpp5
-rw-r--r--engines/sci/gfx/menubar.h6
2 files changed, 5 insertions, 6 deletions
diff --git a/engines/sci/gfx/menubar.cpp b/engines/sci/gfx/menubar.cpp
index 1786c7026f..62120097ab 100644
--- a/engines/sci/gfx/menubar.cpp
+++ b/engines/sci/gfx/menubar.cpp
@@ -32,7 +32,6 @@
#include "sci/engine/state.h"
#include "sci/gfx/menubar.h"
#include "sci/engine/kernel.h"
-#include "sci/gfx/gfx_state_internal.h" // required for GfxPort
namespace Sci {
@@ -389,7 +388,7 @@ bool Menubar::itemValid(int menu_nr, int item_nr) const {
return false; // May not be selected
}
-bool Menubar::mapPointer(const Common::Point &pointerPos, int &menu_nr, int &item_nr, GfxPort *port) const {
+bool Menubar::mapPointer(const Common::Point &pointerPos, int &menu_nr, int &item_nr, Common::Rect portBounds) const {
if (pointerPos.y <= 10) { // Re-evaulate menu
int x = MENU_LEFT_BORDER;
@@ -418,7 +417,7 @@ bool Menubar::mapPointer(const Common::Point &pointerPos, int &menu_nr, int &ite
if ((int)menu._items.size() <= row)
return true;
- if ((pointerPos.x < port->_bounds.x) || (pointerPos.x > port->_bounds.x + port->_bounds.width))
+ if ((pointerPos.x < portBounds.left) || (pointerPos.x > portBounds.right))
return true;
if (itemValid(menu_nr, row))
diff --git a/engines/sci/gfx/menubar.h b/engines/sci/gfx/menubar.h
index 029af5923b..5a440a480b 100644
--- a/engines/sci/gfx/menubar.h
+++ b/engines/sci/gfx/menubar.h
@@ -30,9 +30,9 @@
#include "sci/engine/vm_types.h"
#include "sci/gfx/operations.h"
-#include "sci/gfx/gfx_widgets.h"
#include "common/array.h"
+#include "common/rect.h"
namespace Sci {
@@ -214,11 +214,11 @@ public:
* necessary)
* @param[in] item_nr the current menu item (updated by this function
* if necessary)
- * @param[in] port the port of the currently active menu (if any)
+ * @param[in] portBounds the port bounds of the currently active menu (if any)
* @return true if the pointer is outside a valid port,
* false otherwise.
*/
- bool mapPointer(const Common::Point &pointerPos, int &menu_nr, int &item_nr, GfxPort *port) const;
+ bool mapPointer(const Common::Point &pointerPos, int &menu_nr, int &item_nr, Common::Rect portBounds) const;
};