1
Python / Problem with views and python
« on: June 29, 2008, 07:17:14 pm »
Is there a release date for the python bindings?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
view=sf.View(sf.FloatRect(0.0,0.0,WIDTH,HEIGHT),1)
window.SetView(view)
z=enum{C_GAME_EXIT, C_JUMP, C_RIGHT}
A=BindingManager()
A.Learn(C_GAME_EXIT) %waits for user input and saves raw key code internally
while window.GetEvent(event):
if event.Type==sf.Event.Closed:
running=False
if event.Type==sf.Event.KeyPressed:
if A.Get(event)==z.C_GAME_EXIT: %Returns code (z-value) for the event saved in event
running=False
while window.GetEvent(event):
if event.Type==sf.Event.Closed:
running=False
if event.Type==sf.Event.KeyPressed:
if event.Key.RawCode==KEY_END:
running=False