Python pyglet.window.key.Y Examples
The following are 4
code examples of pyglet.window.key.Y().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
pyglet.window.key
, or try the search function
.
Example #1
Source File: WINDOW_SET_SIZE.py From flappy-bird-py with GNU General Public License v2.0 | 5 votes |
def on_key_press(self, symbol, modifiers): delta = 20 if modifiers & key.MOD_SHIFT: delta = -delta if symbol == key.X: self.width += delta elif symbol == key.Y: self.height += delta self.w.set_size(self.width, self.height) print 'Window size set to %dx%d.' % (self.width, self.height)
Example #2
Source File: WINDOW_FIXED_SET_SIZE.py From flappy-bird-py with GNU General Public License v2.0 | 5 votes |
def on_key_press(self, symbol, modifiers): delta = 20 if modifiers & key.MOD_SHIFT: delta = -delta if symbol == key.X: self.width += delta elif symbol == key.Y: self.height += delta self.w.set_size(self.width, self.height) print 'Window size set to %dx%d.' % (self.width, self.height)
Example #3
Source File: test_window_settings.py From pyglet with BSD 3-Clause "New" or "Revised" License | 5 votes |
def on_key_press(self, symbol, modifiers): delta = 20 if modifiers & key.MOD_SHIFT: delta = -delta if symbol == key.X: self.width += delta elif symbol == key.Y: self.height += delta self.w.set_size(self.width, self.height) print('Window size set to %dx%d.' % (self.width, self.height))
Example #4
Source File: test_window_settings.py From pyglet with BSD 3-Clause "New" or "Revised" License | 5 votes |
def on_key_press(self, symbol, modifiers): delta = 20 if modifiers & key.MOD_SHIFT: delta = -delta if symbol == key.X: self.width += delta elif symbol == key.Y: self.height += delta self.w.set_size(self.width, self.height) print('Window size set to %dx%d.' % (self.width, self.height))