commit a2eac490fae70424d54f446d50a159ed673c85c9
parent a5b044c8d85dbb01419a36cdf139b9cd725b7159
Author: falkTX <falktx@gmail.com>
Date: Tue, 21 Jan 2014 22:02:02 +0000
Fix build for new pugl
Diffstat:
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dgl/Widget.hpp b/dgl/Widget.hpp
@@ -85,7 +85,7 @@ protected:
virtual bool onKeyboard(bool press, uint32_t key);
virtual bool onMouse(int button, bool press, int x, int y);
virtual bool onMotion(int x, int y);
- virtual bool onScroll(float dx, float dy);
+ virtual bool onScroll(int x, int y, float dx, float dy);
virtual bool onSpecial(bool press, Key key);
virtual void onReshape(int width, int height);
virtual void onClose();
diff --git a/dgl/src/Widget.cpp b/dgl/src/Widget.cpp
@@ -207,7 +207,7 @@ bool Widget::onMotion(int, int)
return false;
}
-bool Widget::onScroll(float, float)
+bool Widget::onScroll(int, int, float, float)
{
return false;
}
diff --git a/dgl/src/Window.cpp b/dgl/src/Window.cpp
@@ -581,9 +581,9 @@ protected:
}
}
- void onScroll(const float dx, const float dy)
+ void onScroll(const int x, const int y, const float dx, const float dy)
{
- DBGp("PUGL: onScroll : %f %f\n", dx, dy);
+ DBGp("PUGL: onScroll : %i %i %f %f\n", x, y, dx, dy);
if (fModal.childFocus != nullptr)
return;
@@ -592,7 +592,7 @@ protected:
{
Widget* const widget(*rit);
- if (widget->isVisible() && widget->onScroll(dx, dy))
+ if (widget->isVisible() && widget->onScroll(x, y, dx, dy))
break;
}
}
@@ -710,9 +710,9 @@ private:
handlePtr->onMotion(x, y);
}
- static void onScrollCallback(PuglView* view, float dx, float dy)
+ static void onScrollCallback(PuglView* view, int x, int y, float dx, float dy)
{
- handlePtr->onScroll(dx, dy);
+ handlePtr->onScroll(x, y, dx, dy);
}
static void onSpecialCallback(PuglView* view, bool press, PuglKey key)