I want to make an automated test for game.
What i want to do is, to simulate mouse click on some windows.
Of course, I can generate mouse events at Windows API level, but then it's hard to control which window(CEGUI) to click.
Is there any way to specify a CEGUI window and generate mouse click event?
CEGUI::Window::OnMouse*** events are all protected so I can't directly call them.
simulate user click?
Moderators: CEGUI MVP, CEGUI Team
- scriptkid
- Home away from home
- Posts: 1178
- Joined: Wed Jan 12, 2005 12:06
- Location: The Hague, The Netherlands
- Contact:
Hi,
automated testing = interesting stuff
What you could do is fake a mouse move with the 'injectMousePosition()' call. As you might know, cegui doesn't listen to input itself so this is not hacky or something. It always works like this.
Let's say you want to 'click' your Help button. You could lookup the window, get its screen area (getUnclippedRect()) IIRC, set the mouse at the center and call 'InjecMouseButtonDown()'. All input calls can be found here:
http://www.cegui.org.uk/wiki/index.php/ ... ing_Inputs
HTH.
automated testing = interesting stuff

What you could do is fake a mouse move with the 'injectMousePosition()' call. As you might know, cegui doesn't listen to input itself so this is not hacky or something. It always works like this.
Let's say you want to 'click' your Help button. You could lookup the window, get its screen area (getUnclippedRect()) IIRC, set the mouse at the center and call 'InjecMouseButtonDown()'. All input calls can be found here:
http://www.cegui.org.uk/wiki/index.php/ ... ing_Inputs
HTH.
Last edited by scriptkid on Wed Jul 25, 2007 12:27, edited 1 time in total.
Return to “Modifications / Integrations / Customisations”
Who is online
Users browsing this forum: No registered users and 7 guests