Hi, what version of windows are you using?
cheers, On Thu, Apr 28, 2011 at 10:49 AM, Witton, Caroline <c.wit...@aston.ac.uk>wrote: > Dear pygame-users, > > > > I’m writing some basic pygame programs for use in a research study with > children in schools and I would like to start using a touchscreen laptop > with them. My code works fine with a standard mouse but I’m getting strange > errors when I try with a touchscreen monitor – I would be grateful for any > advice at all. > > > > The problem is that the mouse position co-ordinates I get from the > touchscreen don’t bear any relation to what I get with a standard mouse. > Its a USB HID touchscreen so I had expected it to act like a mouse with one > button. But, for example, the following section of code prints appropriate > mouse co-ordinates if I click the ‘normal’ mouse, but strange (meaningless?) > co-ordinates if I touch the touchscreen, even though the mousemotion and > mouse button events are identified as the correct type. > > > > for event in pygame.event.get(): > > print pygame.event.event_name(event.type) > > if event.type==MOUSEBUTTONDOWN: > > print event.pos > > > > My display is set up simply like this: windowSurface = > pygame.display.set_mode((0, 0), pygame.RESIZABLE, 32) ... and I’m working > in Windows for this project. I’ve already tried updating my drivers and my > version of directX, and have calibrated the touchscreen using the software > provided with the laptop – it works fine for other programs. > > > > I’m not an expert programmer so would be grateful for any advice – is there > something I have missed about setting the display, or about using two input > devices? I’m really stuck! > > > > Any advice gratefully received – many thanks, > > Caroline >