From 946e9f01fcceca17287c96e7ad01a85d4b995599 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 26 Apr 2011 12:07:37 +0000 Subject: [PATCH] From Mattias Helsing, "Fixes two of the osgWidget examples that were broken due to changed virtual function prototypes in osgWidget/EventInterface" --- examples/osgwidgetaddremove/osgwidgetaddremove.cpp | 4 ++-- examples/osgwidgetmenu/osgwidgetmenu.cpp | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/osgwidgetaddremove/osgwidgetaddremove.cpp b/examples/osgwidgetaddremove/osgwidgetaddremove.cpp index 28397e80b..050263abe 100644 --- a/examples/osgwidgetaddremove/osgwidgetaddremove.cpp +++ b/examples/osgwidgetaddremove/osgwidgetaddremove.cpp @@ -39,13 +39,13 @@ public: // changes and what-have-you on mousePush/mouseRelease/etc. is going to be // annoying... - virtual bool mousePush(double, double, osgWidget::WindowManager*) { + virtual bool mousePush(double, double, const osgWidget::WindowManager*) { addColor(0.2f, 0.2f, 0.2f, 0.0f); return true; } - virtual bool mouseRelease(double, double, osgWidget::WindowManager*) { + virtual bool mouseRelease(double, double, const osgWidget::WindowManager*) { addColor(-0.2f, -0.2f, -0.2f, 0.0f); return true; diff --git a/examples/osgwidgetmenu/osgwidgetmenu.cpp b/examples/osgwidgetmenu/osgwidgetmenu.cpp index a87c011b7..14f0b89e0 100644 --- a/examples/osgwidgetmenu/osgwidgetmenu.cpp +++ b/examples/osgwidgetmenu/osgwidgetmenu.cpp @@ -27,17 +27,17 @@ struct ColorLabel: public osgWidget::Label { setEventMask(osgWidget::EVENT_MOUSE_PUSH | osgWidget::EVENT_MASK_MOUSE_MOVE); } - bool mousePush(double, double, osgWidget::WindowManager*) { + bool mousePush(double, double, const osgWidget::WindowManager*) { return true; } - bool mouseEnter(double, double, osgWidget::WindowManager*) { + bool mouseEnter(double, double, const osgWidget::WindowManager*) { setColor(0.6f, 0.6f, 0.6f, 1.0f); return true; } - bool mouseLeave(double, double, osgWidget::WindowManager*) { + bool mouseLeave(double, double, const osgWidget::WindowManager*) { setColor(0.3f, 0.3f, 0.3f, 1.0f); return true; @@ -82,7 +82,7 @@ public: _window->resize(getWidth()); } - bool mousePush(double, double, osgWidget::WindowManager*) { + bool mousePush(double, double, const osgWidget::WindowManager*) { if(!_window->isVisible()) _window->show(); else _window->hide(); @@ -90,7 +90,7 @@ public: return true; } - bool mouseLeave(double, double, osgWidget::WindowManager*) { + bool mouseLeave(double, double, const osgWidget::WindowManager*) { if(!_window->isVisible()) setColor(0.8f, 0.8f, 0.8f, 0.8f); return true;