Um what? This is just something I do as a hobby :-P
On Thu, Aug 5, 2010 at 3:06 PM, Duong Vu <duon...@gmail.com> wrote: > Hi Andrew, > > What the pay range on this? Unless its insane, I think I'll pass. I > would prefer to stay around LA. > > Sent from my iPhone > > On Aug 5, 2010, at 2:54 PM, Andrew Evans <evans.d.and...@gmail.com> wrote: > > > Hello I am trying to use the up down left right arrow keys to move an > object > > > > How ever it does not seem to work and I receive no error messages any > ideas? > > > > from System.Windows.Input import KeyEventHandler > > > > velocity = 10 > > > > class Gui(): > > def __init__(self): > > KeyEventHandler(self.KeyDown_Control) > > ................................ > > > > > > def KeyDown_Control(self, s, e): > > if e.Key == Key.Right: > > self.canvas.SetLeft(self.ship, self.canvas.GetLeft(self.ship) > + velocity) > > elif e.Key == Key.Left: > > self.canvas.SetLeft(self.ship, self.canvas.GetLeft(self.ship) > - velocity) > > elif e.Key == Key.Up: > > self.canvas.SetTop(self.ship, self.canvas.GetTop(self.ship) - > velocity) > > elif e.Key == Key.Down: > > self.canvas.SetTop(self.ship, self.canvas.GetTop(self.ship) + > velocity) > > > > Cheers > > > > and thank you > > > > Andrew > > _______________________________________________ > > Users mailing list > > Users@lists.ironpython.com > > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com > _______________________________________________ > Users mailing list > Users@lists.ironpython.com > http://lists.ironpython.com/listinfo.cgi/users-ironpython.com >
_______________________________________________ Users mailing list Users@lists.ironpython.com http://lists.ironpython.com/listinfo.cgi/users-ironpython.com