Position does not update for animated button's

magistr

07-11-2007 23:30:18

I have an animated button. This button is moved across the screen.
When I click on the button, it moves beyond the boundaries of the screen, or in any other place.
If Ido not move mouse after click, and If I click again, the events raised as pressing a button.
But buttons is moved to other place.

I think that I have this situation becouse system does not update coordinates for object.

P.S. for move I use "move" function.
How to fix this error.

kungfoomasta

07-11-2007 23:56:49

The problem is that the recorded Widget the cursor is over is not updated. (I believe it is called mMouseOverWidget variable)

One solution would be to injectMouseMove(0,0), which would correctly populate the mMouseOverWidget variable. I should probably add this in after effects are applied, so that it will always update the references in important cases like widgets moving when the cursor is not.

I'll fix this in SVN tonight, it should be an easy fix. (What version are you using?)

magistr

08-11-2007 00:04:24

I am use latest SVN version

kungfoomasta

08-11-2007 00:10:43

Can you confirm that calling "GUIManager::injectMouseMoved(0,0)" fixes the issue? I don't have your setup, and I don't have animated buttons, so I can't quickly verify if the proposed fix would work.

You can make a quick function that calls injectMouseMove(0,0), and have the function get called when you hit the space bar, or something.

magistr

08-11-2007 00:15:41

Thanks!

kungfoomasta

08-11-2007 04:47:44

Its in SVN, r250. Let me know if that fixed it. :)