Browse Source

Merge branch 'development' of github.com:capnlove/Torque2D into development

capnlove 12 years ago
parent
commit
7041c63
2 changed files with 10 additions and 0 deletions
  1. 9 0
      engine/source/gui/buttons/guiButtonBaseCtrl.cc
  2. 1 0
      engine/source/testcommit.txt

+ 9 - 0
engine/source/gui/buttons/guiButtonBaseCtrl.cc

@@ -202,6 +202,15 @@ void GuiButtonBaseCtrl::onMouseDown(const GuiEvent &event)
    mouseLock();
    mDepressed = true;
 
+   if (mUseMouseEvents)
+   {
+       char buf[3][32];
+       dSprintf(buf[0], 32, "%d", event.modifier);
+       dSprintf(buf[1], 32, "%d %d", event.mousePoint.x, event.mousePoint.y);
+       dSprintf(buf[2], 32, "%d", event.mouseClickCount);
+       Con::executef(this, 4, "onMouseDown", buf[0], buf[1], buf[2]);
+   }
+
    //update
    setUpdate();
 }

+ 1 - 0
engine/source/testcommit.txt

@@ -0,0 +1 @@
+This is a test!