okami 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/lib/okami/drawable.rb +1 -0
- data/lib/okami/keyboard.rb +11 -0
- data/lib/okami/mouse.rb +13 -1
- metadata +10 -16
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5836252bdfac78c58a83f8460423c5af478f3a5c
|
4
|
+
data.tar.gz: 9890385f640944aba6f48edee7d2c33c671230a7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 736f329df46a2cbf37822c31d0498a5a59228de5e6f60887e3f8d372c5472a006677c496bbf1b61dc34092480a744df38171d908ed8da81f4ecefc0d84855e73
|
7
|
+
data.tar.gz: 366b6ade934053bd31833c2fcf5df06b6a3d6c8b2e693b2e04d508e4c02f559cc3d9524c82b940414fd9f678e9583fdbc86df55807f451a6b2167b3db5de412a
|
data/lib/okami/drawable.rb
CHANGED
data/lib/okami/keyboard.rb
CHANGED
@@ -171,6 +171,17 @@ module Okami::Keyboard
|
|
171
171
|
def call_key_up_listeners key
|
172
172
|
@@key_up_listeners.each { |listener, method| method.call key } if key
|
173
173
|
end
|
174
|
+
|
175
|
+
def release_keys
|
176
|
+
call_key_up_on_down_keys
|
177
|
+
Mouse.send :call_key_up_on_down_keys
|
178
|
+
end
|
179
|
+
|
180
|
+
def call_key_up_on_down_keys
|
181
|
+
@@key_symbols.each do |code, key|
|
182
|
+
call_key_up_listeners key if key_down? key
|
183
|
+
end
|
184
|
+
end
|
174
185
|
end
|
175
186
|
|
176
187
|
end
|
data/lib/okami/mouse.rb
CHANGED
@@ -93,13 +93,25 @@ module Okami::Mouse
|
|
93
93
|
|
94
94
|
def button_down id
|
95
95
|
key = @@key_symbols[id]
|
96
|
-
@@key_down_listeners.each { |listener, method| method.call key }
|
96
|
+
@@key_down_listeners.each { |listener, method| method.call key }
|
97
97
|
end
|
98
98
|
|
99
99
|
def button_up id
|
100
100
|
key = @@key_symbols[id]
|
101
101
|
@@key_up_listeners.each { |listener, method| method.call key } if key
|
102
102
|
end
|
103
|
+
|
104
|
+
def release_keys
|
105
|
+
call_key_up_on_down_keys
|
106
|
+
Okami::Keyboard.send :call_key_up_on_down_keys
|
107
|
+
end
|
108
|
+
|
109
|
+
def call_key_up_on_down_keys
|
110
|
+
@@key_symbols.each do |code, key|
|
111
|
+
button_up key if key_down? key
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
103
115
|
end
|
104
116
|
|
105
117
|
end
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: okami
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.1
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Bue Grønlund
|
@@ -14,33 +13,29 @@ dependencies:
|
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: gosu
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: texplay
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - '>='
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '0'
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - '>='
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '0'
|
46
41
|
description: Gosu Interface with fancy functionality for simplicity.
|
@@ -64,26 +59,25 @@ files:
|
|
64
59
|
- lib/okami/wrapping_angle.rb
|
65
60
|
homepage: https://github.com/Aerotune/Okami
|
66
61
|
licenses: []
|
62
|
+
metadata: {}
|
67
63
|
post_install_message:
|
68
64
|
rdoc_options: []
|
69
65
|
require_paths:
|
70
66
|
- lib
|
71
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
68
|
requirements:
|
74
|
-
- -
|
69
|
+
- - '>='
|
75
70
|
- !ruby/object:Gem::Version
|
76
71
|
version: '0'
|
77
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
78
|
-
none: false
|
79
73
|
requirements:
|
80
|
-
- -
|
74
|
+
- - '>='
|
81
75
|
- !ruby/object:Gem::Version
|
82
76
|
version: '0'
|
83
77
|
requirements: []
|
84
78
|
rubyforge_project:
|
85
|
-
rubygems_version:
|
79
|
+
rubygems_version: 2.0.0
|
86
80
|
signing_key:
|
87
|
-
specification_version:
|
81
|
+
specification_version: 4
|
88
82
|
summary: Okami minimal Gosu!
|
89
83
|
test_files: []
|