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:
parent
d416ebc78c
commit
946e9f01fc
@ -39,13 +39,13 @@ public:
|
|||||||
// changes and what-have-you on mousePush/mouseRelease/etc. is going to be
|
// changes and what-have-you on mousePush/mouseRelease/etc. is going to be
|
||||||
// annoying...
|
// 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);
|
addColor(0.2f, 0.2f, 0.2f, 0.0f);
|
||||||
|
|
||||||
return true;
|
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);
|
addColor(-0.2f, -0.2f, -0.2f, 0.0f);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -27,17 +27,17 @@ struct ColorLabel: public osgWidget::Label {
|
|||||||
setEventMask(osgWidget::EVENT_MOUSE_PUSH | osgWidget::EVENT_MASK_MOUSE_MOVE);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mouseEnter(double, double, osgWidget::WindowManager*) {
|
bool mouseEnter(double, double, const osgWidget::WindowManager*) {
|
||||||
setColor(0.6f, 0.6f, 0.6f, 1.0f);
|
setColor(0.6f, 0.6f, 0.6f, 1.0f);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mouseLeave(double, double, osgWidget::WindowManager*) {
|
bool mouseLeave(double, double, const osgWidget::WindowManager*) {
|
||||||
setColor(0.3f, 0.3f, 0.3f, 1.0f);
|
setColor(0.3f, 0.3f, 0.3f, 1.0f);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
_window->resize(getWidth());
|
_window->resize(getWidth());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool mousePush(double, double, osgWidget::WindowManager*) {
|
bool mousePush(double, double, const osgWidget::WindowManager*) {
|
||||||
if(!_window->isVisible()) _window->show();
|
if(!_window->isVisible()) _window->show();
|
||||||
|
|
||||||
else _window->hide();
|
else _window->hide();
|
||||||
@ -90,7 +90,7 @@ public:
|
|||||||
return true;
|
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);
|
if(!_window->isVisible()) setColor(0.8f, 0.8f, 0.8f, 0.8f);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user