From Mattias Helsing, "Fixes two of the osgWidget examples that were broken due to changed

virtual function prototypes in osgWidget/EventInterface"
This commit is contained in:
Robert Osfield 2011-04-26 12:07:37 +00:00
parent d416ebc78c
commit 946e9f01fc
2 changed files with 7 additions and 7 deletions

View File

@ -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;

View File

@ -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;