From c85b5b99991be4984b5715bdedc2759f818bcc4d Mon Sep 17 00:00:00 2001 From: Nathan Bowhay Date: Mon, 2 Feb 2015 15:54:01 -0800 Subject: [PATCH] Fixed odd callback bugs Fixed bugs with callbacks, I couldn't seem to use U8 correctly in script for some reason, but S32 works. I may have needed to use some extra operators or something maybe, it was so long ago I can't remember what I got in script as it was so long ago. --- .../source/gui/utility/guiMouseEventCtrl.cpp | 18 +++++++++--------- Engine/source/gui/utility/guiMouseEventCtrl.h | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Engine/source/gui/utility/guiMouseEventCtrl.cpp b/Engine/source/gui/utility/guiMouseEventCtrl.cpp index cde0359e9..e0df98af0 100644 --- a/Engine/source/gui/utility/guiMouseEventCtrl.cpp +++ b/Engine/source/gui/utility/guiMouseEventCtrl.cpp @@ -46,7 +46,7 @@ ConsoleDocClass( GuiMouseEventCtrl, ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDown, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDown, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse is pressed down while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -70,7 +70,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDown, void, ( U8 modifier, Point2I "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseUp, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseUp, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse is released while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -94,7 +94,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseUp, void, ( U8 modifier, Point2I m "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseMove, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseMove, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse is moved (without dragging) while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -118,7 +118,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseMove, void, ( U8 modifier, Point2I "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDragged, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDragged, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse is dragged while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -142,7 +142,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseDragged, void, ( U8 modifier, Poi "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseEnter, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseEnter, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse enters this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -166,7 +166,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseEnter, void, ( U8 modifier, Point "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseLeave, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseLeave, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse leaves this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -190,7 +190,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onMouseLeave, void, ( U8 modifier, Point "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseDown, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseDown, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the right mouse button is pressed while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -214,7 +214,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseDown, void, ( U8 modifier, P "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseUp, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseUp, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the right mouse button is released while in this control.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" @@ -238,7 +238,7 @@ IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseUp, void, ( U8 modifier, Poi "@see GuiControl\n\n" ); -IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseDragged, void, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount ), +IMPLEMENT_CALLBACK( GuiMouseEventCtrl, onRightMouseDragged, void, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount ), ( modifier, mousePoint, mouseClickCount ), "@brief Callback that occurs whenever the mouse is dragged in this control while the right mouse button is pressed.\n\n" "@param modifier Key that was pressed during this callback. Values are:\n\n" diff --git a/Engine/source/gui/utility/guiMouseEventCtrl.h b/Engine/source/gui/utility/guiMouseEventCtrl.h index 0a8bf7257..dfb21482d 100644 --- a/Engine/source/gui/utility/guiMouseEventCtrl.h +++ b/Engine/source/gui/utility/guiMouseEventCtrl.h @@ -41,15 +41,15 @@ class GuiMouseEventCtrl : public GuiControl GuiMouseEventCtrl(); - DECLARE_CALLBACK( void, onMouseDown, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onMouseUp, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onMouseMove, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onMouseDragged, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onMouseEnter, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onMouseLeave, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onRightMouseDown, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onRightMouseUp, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); - DECLARE_CALLBACK( void, onRightMouseDragged, ( U8 modifier, Point2I mousePoint,U8 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseDown, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseUp, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseMove, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseDragged, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseEnter, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onMouseLeave, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onRightMouseDown, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onRightMouseUp, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); + DECLARE_CALLBACK( void, onRightMouseDragged, ( S32 modifier, Point2I mousePoint, S32 mouseClickCount )); // GuiControl void onMouseDown(const GuiEvent & event);