mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 16:14:38 +00:00
gameTSCtrl mouse refactor
GameTSCtrl mouse refactoring to make consistent with scripting call backs.
This commit is contained in:
parent
346339904e
commit
f9b445119f
2 changed files with 292 additions and 14 deletions
|
|
@ -41,9 +41,28 @@ private:
|
|||
|
||||
void makeScriptCall(const char *func, const GuiEvent &evt) const;
|
||||
|
||||
void sendMouseEvent(const char *name, const GuiEvent &evt);
|
||||
|
||||
public:
|
||||
GameTSCtrl();
|
||||
|
||||
/// @name Callbacks
|
||||
/// @{
|
||||
|
||||
DECLARE_CALLBACK(void, onMouseDown, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onRightMouseDown, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMiddleMouseDown, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMouseUp, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onRightMouseUp, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMiddleMouseUp, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMouseDragged, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onRightMouseDragged, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMiddleMouseDragged, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMouseWheelUp, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMouseWheelDown, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
DECLARE_CALLBACK(void, onMouseMove, (const char* screenPosition, const char* worldPosition, const char* clickVector));
|
||||
/// }
|
||||
|
||||
DECLARE_CONOBJECT(GameTSCtrl);
|
||||
DECLARE_DESCRIPTION( "A control that renders a 3D view from the current control object." );
|
||||
|
||||
|
|
@ -59,6 +78,13 @@ public:
|
|||
void onRightMouseUp(const GuiEvent &evt) override;
|
||||
void onMiddleMouseUp(const GuiEvent &evt) override;
|
||||
|
||||
void onMouseDragged(const GuiEvent &evt);
|
||||
void onRightMouseDragged(const GuiEvent &evt);
|
||||
void onMiddleMouseDragged(const GuiEvent &evt);
|
||||
|
||||
bool onMouseWheelUp(const GuiEvent &evt);
|
||||
bool onMouseWheelDown(const GuiEvent &evt);
|
||||
|
||||
void onMouseMove(const GuiEvent &evt) override;
|
||||
void onRender(Point2I offset, const RectI &updateRect) override;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue