minigl 2.0.10 → 2.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -4
  3. data/lib/minigl/global.rb +31 -39
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14e4b39f111695d719bd2bc862539aab53c8db50
4
- data.tar.gz: 4cdc0e5cc7ae05ce569a628c974c5d0c8ec0fc5a
3
+ metadata.gz: 16a68505db92c45427222c02e72c96d04bef3d9d
4
+ data.tar.gz: 7f5be28681b92f29d9954ed396bdc0ef2fbf5d0d
5
5
  SHA512:
6
- metadata.gz: 60704db65e358985290d73500b8fda128d0b55fd32e129f89ed3fe183ad0f8011706efb5e646fcb9a40c779d082062aa9e4c47fe43e7b19b2b1a4b627ead304a
7
- data.tar.gz: 8156407024e27dd482a7a61774afd2d36431464489ca6b685068882b2e66ec47cbc9c9ddc645a21e630ebab4bb924b08e27e4c0b2f596efb488fa04b6e05bd24
6
+ metadata.gz: 106e5e610adacbe686b111970addb33030a744745a5f88940e6a1920247dc8c075c16dd840317e18c78665542461001e7d23370fabbb156c5daf6bceebbc1374
7
+ data.tar.gz: 836e2bfbf62d9ffde5637b293d3b57525dc36ab83e4e59823f35909acbf48a85295fd366264caaaabd6e29da44bc9a5ae8a605347509131b4e27a740d6d35708
data/README.md CHANGED
@@ -29,8 +29,6 @@ After installing the Gosu dependencies, you can just `gem install minigl`.
29
29
  * The [wiki](https://github.com/victords/minigl/wiki) is a work in progress with tutorials and examples.
30
30
  * Test package and examples aren't complete!
31
31
 
32
- ## Version 2.0.10
32
+ ## Version 2.0.11
33
33
 
34
- * **Updated Gosu version to ~> 0.11 in dependencies.**
35
- * Eliminated references to `Window` instance when loading resources with `Res`.
36
- * Added `GameWindow#toggle_fullscreen` method.
34
+ * Updated the available keys for the `KB` methods.
@@ -256,24 +256,29 @@ module MiniGL
256
256
  # explicitly.
257
257
  def initialize
258
258
  @keys = [
259
- Gosu::KbUp, Gosu::KbDown,
260
- Gosu::KbReturn, Gosu::KbEscape,
261
- Gosu::KbLeftControl, Gosu::KbRightControl,
262
- Gosu::KbLeftAlt, Gosu::KbRightAlt,
263
- Gosu::KbA, Gosu::KbB, Gosu::KbC, Gosu::KbD, Gosu::KbE, Gosu::KbF,
264
- Gosu::KbG, Gosu::KbH, Gosu::KbI, Gosu::KbJ, Gosu::KbK, Gosu::KbL,
265
- Gosu::KbM, Gosu::KbN, Gosu::KbO, Gosu::KbP, Gosu::KbQ, Gosu::KbR,
266
- Gosu::KbS, Gosu::KbT, Gosu::KbU, Gosu::KbV, Gosu::KbW, Gosu::KbX,
267
- Gosu::KbY, Gosu::KbZ, Gosu::Kb1, Gosu::Kb2, Gosu::Kb3, Gosu::Kb4,
268
- Gosu::Kb5, Gosu::Kb6, Gosu::Kb7, Gosu::Kb8, Gosu::Kb9, Gosu::Kb0,
269
- Gosu::KbNumpad1, Gosu::KbNumpad2, Gosu::KbNumpad3, Gosu::KbNumpad4,
270
- Gosu::KbNumpad5, Gosu::KbNumpad6, Gosu::KbNumpad7, Gosu::KbNumpad8,
271
- Gosu::KbNumpad9, Gosu::KbNumpad0, Gosu::KbSpace, Gosu::KbBackspace,
272
- Gosu::KbDelete, Gosu::KbLeft, Gosu::KbRight, Gosu::KbHome,
273
- Gosu::KbEnd, Gosu::KbLeftShift, Gosu::KbRightShift, Gosu::KbTab,
274
- Gosu::KbBacktick, Gosu::KbMinus, Gosu::KbEqual, Gosu::KbBracketLeft,
275
- Gosu::KbBracketRight, Gosu::KbBackslash, Gosu::KbApostrophe,
276
- Gosu::KbComma, Gosu::KbPeriod, Gosu::KbSlash
259
+ Gosu::KB_A, Gosu::KB_B, Gosu::KB_C, Gosu::KB_D, Gosu::KB_E, Gosu::KB_F,
260
+ Gosu::KB_G, Gosu::KB_H, Gosu::KB_I, Gosu::KB_J, Gosu::KB_K, Gosu::KB_L,
261
+ Gosu::KB_M, Gosu::KB_N, Gosu::KB_O, Gosu::KB_P, Gosu::KB_Q, Gosu::KB_R,
262
+ Gosu::KB_S, Gosu::KB_T, Gosu::KB_U, Gosu::KB_V, Gosu::KB_W, Gosu::KB_X,
263
+ Gosu::KB_Y, Gosu::KB_Z, Gosu::KB_1, Gosu::KB_2, Gosu::KB_3, Gosu::KB_4,
264
+ Gosu::KB_5, Gosu::KB_6, Gosu::KB_7, Gosu::KB_8, Gosu::KB_9, Gosu::KB_0,
265
+ Gosu::KB_NUMPAD_1, Gosu::KB_NUMPAD_2, Gosu::KB_NUMPAD_3, Gosu::KB_NUMPAD_4,
266
+ Gosu::KB_NUMPAD_5, Gosu::KB_NUMPAD_6, Gosu::KB_NUMPAD_7, Gosu::KB_NUMPAD_8,
267
+ Gosu::KB_NUMPAD_9, Gosu::KB_NUMPAD_0, Gosu::KB_F1, Gosu::KB_F2,
268
+ Gosu::KB_F3, Gosu::KB_F4, Gosu::KB_F5, Gosu::KB_F6, Gosu::KB_F7,
269
+ Gosu::KB_F8, Gosu::KB_F9, Gosu::KB_F10, Gosu::KB_F11, Gosu::KB_F12,
270
+ Gosu::KB_APOSTROPHE, Gosu::KB_BACKSLASH, Gosu::KB_BACKSPACE,
271
+ Gosu::KB_BACKTICK, Gosu::KB_COMMA, Gosu::KB_DELETE, Gosu::KB_DOWN,
272
+ Gosu::KB_END, Gosu::KB_ENTER, Gosu::KB_EQUALS, Gosu::KB_ESCAPE,
273
+ Gosu::KB_HOME, Gosu::KB_INSERT, Gosu::KB_ISO, Gosu::KB_LEFT,
274
+ Gosu::KB_LEFT_ALT, Gosu::KB_LEFT_BRACKET, Gosu::KB_LEFT_CONTROL,
275
+ Gosu::KB_LEFT_META, Gosu::KB_LEFT_SHIFT, Gosu::KB_MINUS,
276
+ Gosu::KB_NUMPAD_DIVIDE, Gosu::KB_NUMPAD_MINUS,
277
+ Gosu::KB_NUMPAD_MULTIPLY, Gosu::KB_NUMPAD_PLUS, Gosu::KB_PAGE_DOWN,
278
+ Gosu::KB_PAGE_UP, Gosu::KB_PERIOD, Gosu::KB_RETURN, Gosu::KB_RIGHT,
279
+ Gosu::KB_RIGHT_ALT, Gosu::KB_RIGHT_BRACKET, Gosu::KB_RIGHT_CONTROL,
280
+ Gosu::KB_RIGHT_META, Gosu::KB_RIGHT_SHIFT, Gosu::KB_SEMICOLON,
281
+ Gosu::KB_SLASH, Gosu::KB_SPACE, Gosu::KB_TAB, Gosu::KB_UP
277
282
  ]
278
283
  @down = []
279
284
  @prev_down = []
@@ -313,24 +318,8 @@ module MiniGL
313
318
  # down in the frame before.
314
319
  #
315
320
  # Parameters:
316
- # [key] Code of the key to be checked. The available codes are <code>
317
- # Gosu::KbUp, Gosu::KbDown, Gosu::KbReturn, Gosu::KbEscape,
318
- # Gosu::KbLeftControl, Gosu::KbRightControl,
319
- # Gosu::KbLeftAlt, Gosu::KbRightAlt,
320
- # Gosu::KbA, Gosu::KbB, Gosu::KbC, Gosu::KbD, Gosu::KbE, Gosu::KbF,
321
- # Gosu::KbG, Gosu::KbH, Gosu::KbI, Gosu::KbJ, Gosu::KbK, Gosu::KbL,
322
- # Gosu::KbM, Gosu::KbN, Gosu::KbO, Gosu::KbP, Gosu::KbQ, Gosu::KbR,
323
- # Gosu::KbS, Gosu::KbT, Gosu::KbU, Gosu::KbV, Gosu::KbW, Gosu::KbX,
324
- # Gosu::KbY, Gosu::KbZ, Gosu::Kb1, Gosu::Kb2, Gosu::Kb3, Gosu::Kb4,
325
- # Gosu::Kb5, Gosu::Kb6, Gosu::Kb7, Gosu::Kb8, Gosu::Kb9, Gosu::Kb0,
326
- # Gosu::KbNumpad1, Gosu::KbNumpad2, Gosu::KbNumpad3, Gosu::KbNumpad4,
327
- # Gosu::KbNumpad5, Gosu::KbNumpad6, Gosu::KbNumpad7, Gosu::KbNumpad8,
328
- # Gosu::KbNumpad9, Gosu::KbNumpad0, Gosu::KbSpace, Gosu::KbBackspace,
329
- # Gosu::KbDelete, Gosu::KbLeft, Gosu::KbRight, Gosu::KbHome,
330
- # Gosu::KbEnd, Gosu::KbLeftShift, Gosu::KbRightShift, Gosu::KbTab,
331
- # Gosu::KbBacktick, Gosu::KbMinus, Gosu::KbEqual, Gosu::KbBracketLeft,
332
- # Gosu::KbBracketRight, Gosu::KbBackslash, Gosu::KbApostrophe,
333
- # Gosu::KbComma, Gosu::KbPeriod, Gosu::KbSlash</code>.
321
+ # [key] Code of the key to be checked. The available codes are all the
322
+ # constants in +Gosu+ started with +KB_+.
334
323
  def key_pressed?(key)
335
324
  @prev_down.index(key).nil? and @down.index(key)
336
325
  end
@@ -338,7 +327,8 @@ module MiniGL
338
327
  # Returns whether the given key is down in the current frame.
339
328
  #
340
329
  # Parameters:
341
- # [key] Code of the key to be checked. See +key_pressed?+ for details.
330
+ # [key] Code of the key to be checked. The available codes are all the
331
+ # constants in +Gosu+ started with +KB_+.
342
332
  def key_down?(key)
343
333
  @down.index(key)
344
334
  end
@@ -347,7 +337,8 @@ module MiniGL
347
337
  # down in the frame before.
348
338
  #
349
339
  # Parameters:
350
- # [key] Code of the key to be checked. See +key_pressed?+ for details.
340
+ # [key] Code of the key to be checked. The available codes are all the
341
+ # constants in +Gosu+ started with +KB_+.
351
342
  def key_released?(key)
352
343
  @prev_down.index(key) and @down.index(key).nil?
353
344
  end
@@ -356,7 +347,8 @@ module MiniGL
356
347
  # <code>GameWindow.initialize</code> for details.
357
348
  #
358
349
  # Parameters:
359
- # [key] Code of the key to be checked. See +key_pressed?+ for details.
350
+ # [key] Code of the key to be checked. The available codes are all the
351
+ # constants in +Gosu+ started with +KB_+.
360
352
  def key_held?(key)
361
353
  @held_interval[key] == G.kb_held_interval
362
354
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minigl
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.10
4
+ version: 2.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor David Santos