Skip to content

Commit 1f7731f

Browse files
committed
get read for release.
1 parent 065793f commit 1f7731f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
**v3.11.0** Suggest use of JRuby-9.3.0.0+, some refactoring of GfxRender and ShapeRender.
1+
**v3.11.0** Suggest use of JRuby-9.3.1.0+, some refactoring of GfxRender and ShapeRender. Change `declared_field` to field possible since JRuby-9.3.0.0, required since JRuby-9.3.1.0
22

33
**v3.10.0** Default to using FastNoise module, with alternative of SmoothNoise module.
44

lib/propane/helper_methods.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ def find_method(method_name)
117117
def proxy_java_fields
118118
fields = %w[key frameRate mousePressed keyPressed]
119119
methods = fields.map { |field| java_class.field(field) }
120-
@declared_fields = Hash[fields.zip(methods)]
120+
@jfields = Hash[fields.zip(methods)]
121121
end
122122

123123
# Fix java conversion problems getting the last key
124124
# If it's ASCII, return the character, otherwise the integer
125125
def key
126-
int = @declared_fields['key'].value(java_self)
126+
int = @jfields['key'].value(java_self)
127127
int < 256 ? int.chr : int
128128
end
129129

@@ -160,19 +160,19 @@ def save_strings(filename, strings)
160160

161161
# frame_rate needs to support reading and writing
162162
def frame_rate(fps = nil)
163-
return @declared_fields['frameRate'].value(java_self) unless fps
163+
return @jfields['frameRate'].value(java_self) unless fps
164164

165165
super(fps)
166166
end
167167

168168
# Is the mouse pressed for this frame?
169169
def mouse_pressed?
170-
@declared_fields['mousePressed'].value(java_self)
170+
@jfields['mousePressed'].value(java_self)
171171
end
172172

173173
# Is a key pressed for this frame?
174174
def key_pressed?
175-
@declared_fields['keyPressed'].value(java_self)
175+
@jfields['keyPressed'].value(java_self)
176176
end
177177

178178
private

0 commit comments

Comments
 (0)