Browse Source

Fix build for new pugl

gh-pages
falkTX 10 years ago
parent
commit
a2eac490fa
3 changed files with 7 additions and 7 deletions
  1. +1
    -1
      dgl/Widget.hpp
  2. +1
    -1
      dgl/src/Widget.cpp
  3. +5
    -5
      dgl/src/Window.cpp

+ 1
- 1
dgl/Widget.hpp View File

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


+ 1
- 1
dgl/src/Widget.cpp View File

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


+ 5
- 5
dgl/src/Window.cpp View File

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


Loading…
Cancel
Save