minigl 2.0.10 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -4
- data/lib/minigl/global.rb +31 -39
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 16a68505db92c45427222c02e72c96d04bef3d9d
|
|
4
|
+
data.tar.gz: 7f5be28681b92f29d9954ed396bdc0ef2fbf5d0d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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.
|
|
32
|
+
## Version 2.0.11
|
|
33
33
|
|
|
34
|
-
*
|
|
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.
|
data/lib/minigl/global.rb
CHANGED
|
@@ -256,24 +256,29 @@ module MiniGL
|
|
|
256
256
|
# explicitly.
|
|
257
257
|
def initialize
|
|
258
258
|
@keys = [
|
|
259
|
-
Gosu::
|
|
260
|
-
Gosu::
|
|
261
|
-
Gosu::
|
|
262
|
-
Gosu::
|
|
263
|
-
Gosu::
|
|
264
|
-
Gosu::
|
|
265
|
-
Gosu::
|
|
266
|
-
Gosu::
|
|
267
|
-
Gosu::
|
|
268
|
-
Gosu::
|
|
269
|
-
Gosu::
|
|
270
|
-
Gosu::
|
|
271
|
-
Gosu::
|
|
272
|
-
Gosu::
|
|
273
|
-
Gosu::
|
|
274
|
-
Gosu::
|
|
275
|
-
Gosu::
|
|
276
|
-
Gosu::
|
|
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
|
|
317
|
-
#
|
|
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.
|
|
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.
|
|
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.
|
|
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
|