OnRightMouseDown but no OnLeftMouseDown?
by Rob Segal · in Torque Game Builder · 08/19/2006 (3:30 pm) · 2 replies
Why is there a function t2dSceneWindow::OnRightMouseDown but no t2dSceneWindow::OnLeftMouseDown? The OnLeftMouseDown function seems to be handled by t2dSceneWindow::OnMouseDown. Any particular reason for this GG guys? I just found it a bit confusing discovering this.
#2
08/19/2006 (10:14 pm)
That's true I could add my own so thanks for that suggestion. And yes that's true it is personal preference. In my mind it makes sense to have a "left" and "right" but I'm not designing the API so I don't get to make those decisions.
Torque Owner Sebastian Potter
You could always just add your own "left" versions of the functions in game.cs if you're concerned about consistency. You'd want to do this for sceneWindow2D and t2dSceneObject:
function sceneWindow2D::onLeftMouseDown(%this, %modfier, %worldPosition, %clicks) { %this.onMouseDown(%modifier, %worldPosition, %clicks); } function sceneWindow2D::onLeftMouseDragged(%this, %modfier, %worldPosition, %clicks) { %this.onMouseDragged(%modifier, %worldPosition, %clicks); } function sceneWindow2D::onLeftMouseUp(%this, %modfier, %worldPosition, %clicks) { %this.onMouseUp(%modifier, %worldPosition, %clicks); }