OnMouseDown problem
by Luis Anton Rebollo · in Torque Game Engine · 03/07/2005 (3:55 pm) · 6 replies
Hi all.
I'm trying to make a guiclass with cursor derived from GameTSCtrl., but onMouseDown no execute. OnMouseMove work well.
Any idea?
thx in advance & sorry for my bad english.
I'm trying to make a guiclass with cursor derived from GameTSCtrl., but onMouseDown no execute. OnMouseMove work well.
Any idea?
thx in advance & sorry for my bad english.
About the author
I'm working on a port of Torque3D to OpenGL and Linux/SteamOS
#2
i'm a few stupid. I'm using starter.fps for test my class and in defaul.bind.cs -> (mouse,mouse0, mouse fire).
Action map respond and never call onmousedown.
03/08/2005 (2:05 am)
Thx for the reply... :)i'm a few stupid. I'm using starter.fps for test my class and in defaul.bind.cs -> (mouse,mouse0, mouse fire).
Action map respond and never call onmousedown.
#4
I make a very simple hack to solve this:
in engine/game/fps/guiShapeNameHud.cc
and add method declaration to fuction.
Is very simple to extend...
03/08/2005 (3:56 am)
OK, GuiShapeNameHud eats my click.I make a very simple hack to solve this:
in engine/game/fps/guiShapeNameHud.cc
void GuiShapeNameHud::onMouseDown(const GuiEvent &event)
{
static GuiTSCtrl *_guitspatent = dynamic_cast<GuiTSCtrl*>(getParent());
_guitspatent->onMouseDown(event);
}and add method declaration to fuction.
Is very simple to extend...
void GuiShapeNameHud::onMouseUp(const GuiEvent &event)
{
static GuiTSCtrl *_guitspatent = dynamic_cast<GuiTSCtrl*>(getParent());
_guitspatent->onMouseUp(event);
}
#5
06/08/2008 (3:24 pm)
Having the exact same problem.. I have a mouseTracker class that derives from guiTSCtrl and it has onMouseMove events but no onMouseDown events
#6
06/09/2008 (9:29 am)
Likely there is a higher-level GUI "on top" of yours that is consuming the input events. You can either modify the source code of the higher-level GUI to pass mouse events on to the parent (as above) or change its profile to "GuiModelessProfile."
Torque Owner Andrew Haydn Grant
You have created a subclass of GameTSCtrl. When you use that class, your onMouseMove override seems to work fine, but onMouseDown never gets called.
Is that correct?