On 30/05/2014 at 11:01, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 14
Platform: Mac ;
Language(s) : C++ ;
---------
Hello all,
I'm trying to have Cinema display a specific mouse icon while something is being dragged over a tag plugin in the Object Manager. I only want my changed cursor to be there while the cursor is over the tag and if the mouse is released while over the tag something happens.
//while the left mouse button is held down
while (state.GetLong(BFM_INPUT_VALUE) == TRUE)
{
//get mouse state
if(!GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state)) return TRUE;
//change mouse cusor
GeShowMouse(MOUSE_QUESTION);
//if the left mouse bottom is let go
if (state.GetLong(BFM_INPUT_VALUE) == FALSE)
{
//Mouse released over tag
}
}
My current idea is to just break out of my while loop when the mouse moves off of the tag, but I don't know how to get the location of that.
while (state.GetLong(BFM_INPUT_VALUE) == TRUE)
{
if(!GetInputState(BFM_INPUT_MOUSE, BFM_INPUT_MOUSELEFT, state)) return TRUE;
// need to find the left, right, top, and bottom bounds of my tag
//idea
if ( !(left < state.GetLong(BFM_INPUT_X) < right) and !(bottom < state.GetLong(BFM_INPUT_Y) < top)) break;
GeShowMouse(MOUSE_QUESTION);
if (state.GetLong(BFM_INPUT_VALUE) == FALSE)
{
//Mouse released over tag
}
}
Am I going about this the wrong way or is there a way to get the tag's position in the Object Manager?
As always, thanks
Dan