gosu 0.7.19-universal-darwin → 0.7.20-universal-darwin

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. data/examples/TextInput.rb +15 -0
  2. data/lib/gosu.for_1_8.bundle +0 -0
  3. data/lib/gosu.for_1_9.bundle +0 -0
  4. data/lib/gosu.rb +5 -8
  5. metadata +2 -28
  6. data/reference/rdoc/classes/Gosu.html +0 -1546
  7. data/reference/rdoc/classes/Gosu/Color.html +0 -660
  8. data/reference/rdoc/classes/Gosu/Font.html +0 -545
  9. data/reference/rdoc/classes/Gosu/GLTexInfo.html +0 -412
  10. data/reference/rdoc/classes/Gosu/Image.html +0 -706
  11. data/reference/rdoc/classes/Gosu/Sample.html +0 -476
  12. data/reference/rdoc/classes/Gosu/SampleInstance.html +0 -523
  13. data/reference/rdoc/classes/Gosu/Song.html +0 -568
  14. data/reference/rdoc/classes/Gosu/TextInput.html +0 -444
  15. data/reference/rdoc/classes/Gosu/Window.html +0 -911
  16. data/reference/rdoc/classes/Numeric.html +0 -479
  17. data/reference/rdoc/created.rid +0 -1
  18. data/reference/rdoc/files/COPYING_txt.html +0 -391
  19. data/reference/rdoc/files/README_txt.html +0 -387
  20. data/reference/rdoc/files/reference/Deployment on OS X_rdoc.html +0 -381
  21. data/reference/rdoc/files/reference/Deployment on Windows_rdoc.html +0 -385
  22. data/reference/rdoc/files/reference/Drawing with Colors_rdoc.html +0 -363
  23. data/reference/rdoc/files/reference/Order of Corners_rdoc.html +0 -358
  24. data/reference/rdoc/files/reference/Tileability_rdoc.html +0 -374
  25. data/reference/rdoc/files/reference/Z Ordering_rdoc.html +0 -361
  26. data/reference/rdoc/files/reference/gosu_rb.html +0 -348
  27. data/reference/rdoc/fr_class_index.html +0 -12
  28. data/reference/rdoc/fr_file_index.html +0 -10
  29. data/reference/rdoc/fr_method_index.html +0 -66
  30. data/reference/rdoc/index.html +0 -1
  31. data/reference/rdoc/rdoc-style.css +0 -322
@@ -102,6 +102,19 @@ class TextField < Gosu::TextInput
102
102
  mouse_x > x - PADDING and mouse_x < x + width + PADDING and
103
103
  mouse_y > y - PADDING and mouse_y < y + height + PADDING
104
104
  end
105
+
106
+ # Tries to move the caret to the position specifies by mouse_x
107
+ def move_caret(mouse_x)
108
+ # Test character by character
109
+ 1.upto(self.text.length) do |i|
110
+ if mouse_x < x + @font.text_width(text[0...i]) then
111
+ self.caret_pos = self.selection_start = i - 1;
112
+ return
113
+ end
114
+ end
115
+ # Default case: user must have clicked the right edge
116
+ self.caret_pos = self.selection_start = self.text.length
117
+ end
105
118
  end
106
119
 
107
120
  class TextInputWindow < Gosu::Window
@@ -138,6 +151,8 @@ class TextInputWindow < Gosu::Window
138
151
  elsif id == Gosu::MsLeft then
139
152
  # Mouse click: Select text field based on mouse position.
140
153
  self.text_input = @text_fields.find { |tf| tf.under_point?(mouse_x, mouse_y) }
154
+ # Advanced: Move caret to clicked position
155
+ self.text_input.move_caret(mouse_x) unless self.text_input.nil?
141
156
  end
142
157
  end
143
158
  end
Binary file
Binary file
@@ -1,16 +1,13 @@
1
1
  require 'rbconfig'
2
2
 
3
3
  begin
4
- if defined? NSObject then
5
- require "#{File.dirname(__FILE__)}/gosu.for_macruby.bundle"
6
- require "#{File.dirname(__FILE__)}/hotgosu.rb"
7
- elsif defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
8
- require "#{File.dirname(__FILE__)}/gosu.for_1_9.#{Config::CONFIG['DLEXT']}"
9
- require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
4
+ if defined? RUBY_VERSION and RUBY_VERSION[0..2] == '1.9' then
5
+ version = '1_9'
10
6
  else
11
- require "#{File.dirname(__FILE__)}/gosu.for_1_8.#{Config::CONFIG['DLEXT']}"
12
- require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
7
+ version = '1_8'
13
8
  end
9
+ require "#{File.dirname(__FILE__)}/gosu.for_#{version}.#{Config::CONFIG['DLEXT']}"
10
+ require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
14
11
  rescue LoadError => e
15
12
  require "#{File.dirname(__FILE__)}/gosu.custom.#{Config::CONFIG['DLEXT']}"
16
13
  require "#{File.dirname(__FILE__)}/gosu/swig_patches.rb"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gosu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.19
4
+ version: 0.7.20
5
5
  platform: universal-darwin
6
6
  authors:
7
7
  - Julian Raschke
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-04-25 00:00:00 +08:00
13
+ date: 2010-05-30 00:00:00 +08:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -50,32 +50,6 @@ files:
50
50
  - examples/media/Space.png
51
51
  - examples/media/Star.png
52
52
  - examples/media/Starfighter.bmp
53
- - reference/rdoc/classes/Gosu/Color.html
54
- - reference/rdoc/classes/Gosu/Font.html
55
- - reference/rdoc/classes/Gosu/GLTexInfo.html
56
- - reference/rdoc/classes/Gosu/Image.html
57
- - reference/rdoc/classes/Gosu/Sample.html
58
- - reference/rdoc/classes/Gosu/SampleInstance.html
59
- - reference/rdoc/classes/Gosu/Song.html
60
- - reference/rdoc/classes/Gosu/TextInput.html
61
- - reference/rdoc/classes/Gosu/Window.html
62
- - reference/rdoc/classes/Gosu.html
63
- - reference/rdoc/classes/Numeric.html
64
- - reference/rdoc/created.rid
65
- - reference/rdoc/files/COPYING_txt.html
66
- - reference/rdoc/files/README_txt.html
67
- - reference/rdoc/files/reference/Deployment on OS X_rdoc.html
68
- - reference/rdoc/files/reference/Deployment on Windows_rdoc.html
69
- - reference/rdoc/files/reference/Drawing with Colors_rdoc.html
70
- - reference/rdoc/files/reference/gosu_rb.html
71
- - reference/rdoc/files/reference/Order of Corners_rdoc.html
72
- - reference/rdoc/files/reference/Tileability_rdoc.html
73
- - reference/rdoc/files/reference/Z Ordering_rdoc.html
74
- - reference/rdoc/fr_class_index.html
75
- - reference/rdoc/fr_file_index.html
76
- - reference/rdoc/fr_method_index.html
77
- - reference/rdoc/index.html
78
- - reference/rdoc/rdoc-style.css
79
53
  - lib/gosu.for_1_8.bundle
80
54
  - lib/gosu.for_1_9.bundle
81
55
  has_rdoc: true
@@ -1,1546 +0,0 @@
1
- <html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml"><head><meta content="text/html; charset=utf-8" http-equiv="Content-Type"/><title>Module: Gosu</title><link type="text/css" href=".././rdoc-style.css" rel="stylesheet" media="screen"/><script type="text/javascript">
2
- // Allison template
3
- // Copyright 2007, 2008 Cloudburst, LLC. Licensed under the AFL 3. See the included LICENSE file.
4
-
5
- var href_base = '.././rdoc-style.css'.replace(/(.*\/).*/, '$1'); // inline js is good for something
6
-
7
- function $(id) {
8
- if (document.getElementById)
9
- elem = document.getElementById(id);
10
- else if ( document.all )
11
- elem = eval("document.all." + id);
12
- else
13
- return false;
14
- return elem;
15
- }
16
-
17
- function toggle(id) {
18
- elem = $(id);
19
- elemStyle = elem.style;
20
- if (elemStyle.display == "block") {
21
- elemStyle.display = "none"
22
- } else {
23
- elemStyle.display = "block"
24
- }
25
- return true;
26
- }
27
-
28
- function toggleText(id) {
29
- elem = $(id)
30
- if (m = elem.innerHTML.match(/(Hide)(.*)/)) {
31
- elem.innerHTML = "Show" + m[2];
32
- } else if (m = elem.innerHTML.match(/(Show)(.*)/)) {
33
- elem.innerHTML = "Hide" + m[2];
34
- }
35
- return true;
36
- }
37
-
38
- function span(s, klass) {
39
- return '<span class="' + klass + '">' + s + '</span>';
40
- }
41
-
42
- function highlightSymbols() {
43
- pres = document.getElementsByTagName('pre');
44
- for(var i = 0; i < pres.length; i++) {
45
- pre = pres[i];
46
- spans = pre.getElementsByTagName('span');
47
- for(var k = 0; k < spans.length; k++) {
48
- span = spans[k];
49
- if (span.className.match(/ruby-identifier/)) {
50
- if (span.innerHTML.match(/^:/)) {
51
- span.className += " ruby-symbol";
52
- }
53
- }
54
- }
55
- }
56
- }
57
-
58
- function hasClass(obj) {
59
- var result = false;
60
- if (obj.getAttributeNode("class") != null) {
61
- result = obj.getAttributeNode("class").value;
62
- }
63
- return result;
64
- }
65
-
66
- function stripe() {
67
- var even = true;
68
- var color = "#e4ebed";
69
- var tables = document.getElementsByTagName('table');
70
- if (tables.length == 0) { return; }
71
- for (var h = 0; h < tables.length; h++) {
72
- var trs = tables[h].getElementsByTagName("tr");
73
- for (var i = 0; i < trs.length; i++) {
74
- var tds = trs[i].getElementsByTagName("td");
75
- for (var j = 0; j < tds.length; j++) {
76
- if (hasClass(tds[j]) != "first") {
77
- var mytd = tds[j];
78
- if (even) {
79
- mytd.style.backgroundColor = color;
80
- }
81
- }
82
- }
83
- even = ! even;
84
- }
85
- }
86
- }
87
-
88
- function ajaxGet(url) {
89
- url = (href_base + url).replace('/./', '/')
90
- var req = false;
91
-
92
- if (window.ActiveXObject) {
93
- try {
94
- // stupid hack because IE7 disables local Ajax with the native xmlhttprequest object
95
- // for security purposes. Yet ActiveX still works. Thanks, Microsoft. I hate you. Die.
96
- req = new ActiveXObject("MSXML2.XMLHTTP.3.0");
97
- } catch (e) {
98
- try {
99
- /* IE 6 and maybe 5, don't know, don't care */
100
- req = new ActiveXObject("Msxml2.XMLHTTP");
101
- } catch (e) {
102
- try {
103
- req = new ActiveXObject("Microsoft.XMLHTTP");
104
- } catch (e) {
105
- req = false;
106
- }
107
- }
108
- }
109
- }
110
-
111
- /* real browsers */
112
- if (!req && window.XMLHttpRequest) {
113
- try {
114
- req = new XMLHttpRequest();
115
- } catch (e) {
116
- req = false;
117
- }
118
- }
119
-
120
- if (req) {
121
- req.open('GET', url, false);
122
- req.send(null);
123
- return req.responseText;
124
- } else {
125
- return "Ajax error";
126
- }
127
- }
128
-
129
-
130
- function addEvent(elm, evType, fn, useCapture) {
131
- if (elm.addEventListener) {
132
- elm.addEventListener(evType, fn, useCapture);
133
- return true;
134
- } else if (elm.attachEvent) {
135
- var r = elm.attachEvent('on' + evType, fn);
136
- return r;
137
- } else {
138
- elm['on' + evType] = fn;
139
- }
140
- }
141
-
142
- function insertIndices() {
143
- pages = ["class", "file", "method"]
144
- for (x in pages) {
145
- $(pages[x]).innerHTML += ajaxGet('fr_' + pages[x] + '_index.html').replace(/(href=")/g, '$1' + href_base);
146
- }
147
- /* mouseoverify method links */
148
- links = $('method').getElementsByTagName('a');
149
- for (var x = 0; x < links.length; x++) {
150
- if (m = links[x].innerHTML.match(/(.*)\s\((.*)\)/)) {
151
- links[x].innerHTML = m[1] + '<br>';
152
- links[x].title = m[2];
153
- }
154
- }
155
- /* this is stupid */
156
- $('class').style.display = "block";
157
- $('file').style.display = "block";
158
-
159
- /* has to be here because IE7 does not guarantee the onLoad callback order */
160
- abbreviateIndicesInner(["class", "file"], 25, "a");
161
- /* same, linkTitle() depends on the class link list */
162
- linkTitle();
163
- }
164
-
165
- function abbreviateIndices() {
166
- var ids = ["defined_in", "child_of", "includes", "requires", "method", "methods"];
167
- abbreviateIndicesInner(ids, 25, 'a');
168
- abbreviateIndicesInner(ids, 25, 'span');
169
- }
170
-
171
- function abbreviateIndicesInner(indices, amount, tag) {
172
- for (var x = 0; x < indices.length; x++) {
173
- var the_index = $(indices[x]);
174
- if (the_index) {
175
- links = the_index.getElementsByTagName(tag);
176
- for (var y = 0; y < links.length; y++) {
177
- var link = links[y];
178
- if (link.getElementsByTagName('span').length == 0 && link.getElementsByTagName('a').length == 0) {
179
- // avoid nesting
180
- link.innerHTML = link.innerHTML.replace(/<br>|\n/gi, '');
181
- link.title = link.innerHTML;
182
- link.innerHTML = abbreviate(link.innerHTML, amount) + '<br>';
183
- }
184
- }
185
- }
186
- }
187
- }
188
-
189
- function linkTitle() {
190
-
191
- /* grab the correct title element from the index */
192
- var index_page = ajaxGet('index.html');
193
- title_text = index_page.match(/<title>(.*)<\/title>/m)[1];
194
- document.title = title_text + " - " + document.title;
195
- var p = $('header').getElementsByTagName('p')[0]
196
- if (p.innerHTML.match(/^\s*$/)) {
197
- p.innerHTML = title_text;
198
- } else {
199
- p.innerHTML = title_text + ": " + p.innerHTML;
200
- }
201
-
202
- /* set the link properly */
203
- title_link = index_page.match(/<a\s+href="(.*?)"/)[1];
204
- var element = $('title');
205
- var item_type = "";
206
- var item_name = "";
207
- if (m = element.innerHTML.match(/(Class:|Module:|File:)\s*(.*)/)) {
208
- item_type = m[1];
209
- item_name = m[2];
210
- } else {
211
- item_name = element.innerHTML;
212
- }
213
- element.innerHTML = '<a href="' + href_base + title_link + '">' + item_type + " " + abbreviate(item_name, 45) + '</a>';
214
- element.getElementsByTagName('a')[0].title = item_name
215
-
216
- /* breadcrumb navigation */
217
- items = item_name.split("::");
218
- items_new = item_name.split("::");
219
- file_links = $('class').getElementsByTagName('a');
220
- for (var x = 0; x < items.length - 1; x++ ){
221
- var item = items[x];
222
- link = ("/classes/" + items.slice(0,x).join("/") + "/" + item + ".html").replace('//', '/');
223
- regex = new RegExp(RegExp.escape(link) + '$');
224
- for (var y = 0; y < file_links.length; y++) {
225
- if (file_links[y].href.match(regex)) {
226
- items_new[x] = '<a href="' + href_base + link + '">' + item + '</a>';
227
- break;
228
- }
229
- }
230
- }
231
- $('item_name').innerHTML = item_type + ' ' + items_new.join(" :: ");
232
- }
233
-
234
- function abbreviate(s, size) {
235
- // Try to get rid of path and extension in any case. These are not
236
- // even interesting if there is enough space.
237
-
238
- s = s.replace(/\..*$/, '');
239
- s = s.replace(/.*\//g, '');
240
-
241
- // Now this is a blatant hack.
242
-
243
- if (s == 'gosu')
244
- return ''; // Noone will ever see the link, harhar!
245
-
246
- while (s.length > size) {
247
- var old_s = s;
248
- s = s.replace(/\s|\n/mg, '');
249
- s = s.replace(/([A-Z])[a-z]+/m, '$1');
250
- if (!s || old_s == s) {
251
- return "..." + s.substring(s.length - size, s.length);
252
- }
253
- }
254
- return s;
255
- }
256
-
257
- function disableSubmit(event) {
258
- var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
259
- if (keyCode == 13) {
260
- return false;
261
- } else {
262
- return true;
263
- }
264
- }
265
-
266
- function filterList(id, s, event) {
267
-
268
- /* some weak escaping */
269
- s = s.replace(/[^\w\d\.\_\-\/\:\=\[\]\?\!]/g, '');
270
- s = RegExp.escape(s);
271
-
272
- var show_all = false;
273
- if (s.match(/^\s*$/)) {
274
- show_all = true;
275
- }
276
-
277
- links = $(id).getElementsByTagName('a')
278
- regex = new RegExp(s, 'i');
279
-
280
- for (var x = 0; x < links.length; x++) {
281
- var link = links[x];
282
- if (show_all) {
283
- link.style.display = 'inline';
284
- } else {
285
- if (link.innerHTML.match(regex)) {
286
- link.style.display = 'inline';
287
- } else {
288
- link.style.display = 'none';
289
- }
290
- }
291
- }
292
- return true;
293
- }
294
-
295
- RegExp.escape = function(text) {
296
- if (!arguments.callee.sRE) {
297
- var specials = ['/', '.', '*', '+', '?', '|', '(', ')', '[', ']', '{', '}', '\\'];
298
- arguments.callee.sRE = new RegExp(
299
- '(\\' + specials.join('|\\') + ')', 'g'
300
- );
301
- }
302
- return text.replace(arguments.callee.sRE, '\\$1');
303
- }
304
-
305
- function hacks() {
306
- // show the spacer if necessary,
307
- divs = document.getElementsByTagName('div');
308
- for(var x = 0; x < divs.length; x++) {
309
- if (divs[x].className && divs[x].className.match(/top/)) {
310
- document.getElementById('spacer').style.display = 'block';
311
- }
312
- }
313
- // remove extra colons from tables
314
- tds = document.getElementsByTagName('td');
315
- for(var x = 0; x < tds.length; x++) {
316
- str = tds[x].innerHTML
317
- if (str.charAt(str.length - 1) == ":") {
318
- tds[x].innerHTML = str.slice(0, str.length - 1)
319
- }
320
- }
321
- }
322
-
323
- addEvent(window, 'load', insertIndices, false);
324
- addEvent(window, 'load', abbreviateIndices, false);
325
- addEvent(window, 'load', stripe, false);
326
- addEvent(window, 'load', highlightSymbols, false);
327
- addEvent(window, 'load', hacks, false);
328
- </script></head><body><div id="container"><div class="curve" id="preheader_curve_0"></div><div class="curve" id="preheader_curve_1"></div><div class="curve" id="preheader_curve_2"></div><div class="curve" id="preheader_curve_3"></div><div class="curve" id="preheader_curve_4"></div><div class="curve" id="preheader_curve_5"></div><div id="header"><span><h1 id="title">
329
- Module: Gosu
330
- </h1></span></div><div class="clear"></div><div id="left">
331
-
332
- <div class="navigation darker top" id="defined_in"><h3>Defined in</h3>
333
-
334
- <a href="../files/reference/gosu_rb.html">reference/gosu.rb</a>
335
-
336
- </div>
337
-
338
-
339
-
340
- <div class="navigation top" id="methods"><h3>Methods</h3>
341
-
342
-
343
- <a href='#M000008'>
344
- angle<br/>
345
- </a>
346
-
347
-
348
-
349
-
350
- <a href='#M000009'>
351
- angle_diff<br/>
352
- </a>
353
-
354
-
355
-
356
-
357
- <a href='#M000012'>
358
- default_font_name<br/>
359
- </a>
360
-
361
-
362
-
363
-
364
- <a href='#M000010'>
365
- distance<br/>
366
- </a>
367
-
368
-
369
-
370
-
371
- <a href='#M000011'>
372
- milliseconds<br/>
373
- </a>
374
-
375
-
376
-
377
-
378
- <a href='#M000006'>
379
- offset_x<br/>
380
- </a>
381
-
382
-
383
-
384
-
385
- <a href='#M000007'>
386
- offset_y<br/>
387
- </a>
388
-
389
-
390
-
391
-
392
- <a href='#M000005'>
393
- random<br/>
394
- </a>
395
-
396
-
397
-
398
-
399
- <a href='#M000014'>
400
- screen_height<br/>
401
- </a>
402
-
403
-
404
-
405
-
406
- <a href='#M000013'>
407
- screen_width<br/>
408
- </a>
409
-
410
-
411
- </div>
412
- <div id="spacer"></div><div class="navigation darker index" id="class_wrapper"><div class="list_header"><h3>All classes</h3></div><div class="list_header_link"><a href="#" onclick="toggle('class'); toggleText('class_link'); return false;" id="class_link">Hide...</a></div><div class="clear"></div><div id="class"><form><label for="filter_class">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('class', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_class"></input></form></div></div><div class="navigation darker index" id="file_wrapper"><div class="list_header"><h3>All files</h3></div><div class="list_header_link"><a href="#" onclick="toggle('file'); toggleText('file_link'); return false;" id="file_link">Hide...</a></div><div class="clear"></div><div id="file"><form><label for="filter_file">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('file', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_file"></input></form></div></div><div class="navigation darker index" id="method_wrapper"><div class="list_header"><h3>All methods</h3></div><div class="list_header_link"><a href="#" onclick="toggle('method'); toggleText('method_link'); return false;" id="method_link">Show...</a></div><div class="clear"></div><div id="method"><form><label for="filter_method">Filter:&nbsp;&nbsp;</label><input type="text" onKeyUp="return filterList('method', this.value, event);" onKeyPress="return disableSubmit(event);" id="filter_method"></input></form></div></div></div><div id="content">
413
-
414
-
415
-
416
-
417
- <p></p>
418
-
419
- <h1>Child modules and classes</h1><p>Class <a href="Gosu/Color.html" class="link">Gosu::Color</a><br />
420
- Class <a href="Gosu/Font.html" class="link">Gosu::Font</a><br />
421
- Class <a href="Gosu/GLTexInfo.html" class="link">Gosu::GLTexInfo</a><br />
422
- Class <a href="Gosu/Image.html" class="link">Gosu::Image</a><br />
423
- Class <a href="Gosu/Sample.html" class="link">Gosu::Sample</a><br />
424
- Class <a href="Gosu/SampleInstance.html" class="link">Gosu::SampleInstance</a><br />
425
- Class <a href="Gosu/Song.html" class="link">Gosu::Song</a><br />
426
- Class <a href="Gosu/TextInput.html" class="link">Gosu::TextInput</a><br />
427
- Class <a href="Gosu/Window.html" class="link">Gosu::Window</a><br />
428
- </p>
429
-
430
- <h1>Constants</h1><p><table><tr><th>Name</th><th>Value</th></tr>
431
- <tr>
432
- <td class="highlight">VERSION</td>
433
-
434
- <td class="normal">:a_string</td>
435
-
436
-
437
-
438
- </tr>
439
- <tr>
440
- <td class="highlight">MAJOR_VERSION</td>
441
-
442
- <td class="normal">:a_fixnum</td>
443
-
444
-
445
-
446
- </tr>
447
- <tr>
448
- <td class="highlight">MINOR_VERSION</td>
449
-
450
- <td class="normal">:a_fixnum</td>
451
-
452
-
453
-
454
- </tr>
455
- <tr>
456
- <td class="highlight">POINT_VERSION</td>
457
-
458
- <td class="normal">:a_fixnum</td>
459
-
460
-
461
-
462
- </tr>
463
- <tr>
464
- <td class="highlight">Kb0</td>
465
-
466
- <td class="normal">:implementation_defined</td>
467
-
468
-
469
-
470
- </tr>
471
- <tr>
472
- <td class="highlight">Kb1</td>
473
-
474
- <td class="normal">:implementation_defined</td>
475
-
476
-
477
-
478
- </tr>
479
- <tr>
480
- <td class="highlight">Kb2</td>
481
-
482
- <td class="normal">:implementation_defined</td>
483
-
484
-
485
-
486
- </tr>
487
- <tr>
488
- <td class="highlight">Kb3</td>
489
-
490
- <td class="normal">:implementation_defined</td>
491
-
492
-
493
-
494
- </tr>
495
- <tr>
496
- <td class="highlight">Kb4</td>
497
-
498
- <td class="normal">:implementation_defined</td>
499
-
500
-
501
-
502
- </tr>
503
- <tr>
504
- <td class="highlight">Kb5</td>
505
-
506
- <td class="normal">:implementation_defined</td>
507
-
508
-
509
-
510
- </tr>
511
- <tr>
512
- <td class="highlight">Kb6</td>
513
-
514
- <td class="normal">:implementation_defined</td>
515
-
516
-
517
-
518
- </tr>
519
- <tr>
520
- <td class="highlight">Kb7</td>
521
-
522
- <td class="normal">:implementation_defined</td>
523
-
524
-
525
-
526
- </tr>
527
- <tr>
528
- <td class="highlight">Kb8</td>
529
-
530
- <td class="normal">:implementation_defined</td>
531
-
532
-
533
-
534
- </tr>
535
- <tr>
536
- <td class="highlight">Kb9</td>
537
-
538
- <td class="normal">:implementation_defined</td>
539
-
540
-
541
-
542
- </tr>
543
- <tr>
544
- <td class="highlight">KbA</td>
545
-
546
- <td class="normal">:implementation_defined</td>
547
-
548
-
549
-
550
- </tr>
551
- <tr>
552
- <td class="highlight">KbB</td>
553
-
554
- <td class="normal">:implementation_defined</td>
555
-
556
-
557
-
558
- </tr>
559
- <tr>
560
- <td class="highlight">KbC</td>
561
-
562
- <td class="normal">:implementation_defined</td>
563
-
564
-
565
-
566
- </tr>
567
- <tr>
568
- <td class="highlight">KbD</td>
569
-
570
- <td class="normal">:implementation_defined</td>
571
-
572
-
573
-
574
- </tr>
575
- <tr>
576
- <td class="highlight">KbE</td>
577
-
578
- <td class="normal">:implementation_defined</td>
579
-
580
-
581
-
582
- </tr>
583
- <tr>
584
- <td class="highlight">KbF</td>
585
-
586
- <td class="normal">:implementation_defined</td>
587
-
588
-
589
-
590
- </tr>
591
- <tr>
592
- <td class="highlight">KbG</td>
593
-
594
- <td class="normal">:implementation_defined</td>
595
-
596
-
597
-
598
- </tr>
599
- <tr>
600
- <td class="highlight">KbH</td>
601
-
602
- <td class="normal">:implementation_defined</td>
603
-
604
-
605
-
606
- </tr>
607
- <tr>
608
- <td class="highlight">KbI</td>
609
-
610
- <td class="normal">:implementation_defined</td>
611
-
612
-
613
-
614
- </tr>
615
- <tr>
616
- <td class="highlight">KbJ</td>
617
-
618
- <td class="normal">:implementation_defined</td>
619
-
620
-
621
-
622
- </tr>
623
- <tr>
624
- <td class="highlight">KbK</td>
625
-
626
- <td class="normal">:implementation_defined</td>
627
-
628
-
629
-
630
- </tr>
631
- <tr>
632
- <td class="highlight">KbL</td>
633
-
634
- <td class="normal">:implementation_defined</td>
635
-
636
-
637
-
638
- </tr>
639
- <tr>
640
- <td class="highlight">KbM</td>
641
-
642
- <td class="normal">:implementation_defined</td>
643
-
644
-
645
-
646
- </tr>
647
- <tr>
648
- <td class="highlight">KbN</td>
649
-
650
- <td class="normal">:implementation_defined</td>
651
-
652
-
653
-
654
- </tr>
655
- <tr>
656
- <td class="highlight">KbO</td>
657
-
658
- <td class="normal">:implementation_defined</td>
659
-
660
-
661
-
662
- </tr>
663
- <tr>
664
- <td class="highlight">KbP</td>
665
-
666
- <td class="normal">:implementation_defined</td>
667
-
668
-
669
-
670
- </tr>
671
- <tr>
672
- <td class="highlight">KbQ</td>
673
-
674
- <td class="normal">:implementation_defined</td>
675
-
676
-
677
-
678
- </tr>
679
- <tr>
680
- <td class="highlight">KbR</td>
681
-
682
- <td class="normal">:implementation_defined</td>
683
-
684
-
685
-
686
- </tr>
687
- <tr>
688
- <td class="highlight">KbS</td>
689
-
690
- <td class="normal">:implementation_defined</td>
691
-
692
-
693
-
694
- </tr>
695
- <tr>
696
- <td class="highlight">KbT</td>
697
-
698
- <td class="normal">:implementation_defined</td>
699
-
700
-
701
-
702
- </tr>
703
- <tr>
704
- <td class="highlight">KbU</td>
705
-
706
- <td class="normal">:implementation_defined</td>
707
-
708
-
709
-
710
- </tr>
711
- <tr>
712
- <td class="highlight">KbV</td>
713
-
714
- <td class="normal">:implementation_defined</td>
715
-
716
-
717
-
718
- </tr>
719
- <tr>
720
- <td class="highlight">KbW</td>
721
-
722
- <td class="normal">:implementation_defined</td>
723
-
724
-
725
-
726
- </tr>
727
- <tr>
728
- <td class="highlight">KbX</td>
729
-
730
- <td class="normal">:implementation_defined</td>
731
-
732
-
733
-
734
- </tr>
735
- <tr>
736
- <td class="highlight">KbY</td>
737
-
738
- <td class="normal">:implementation_defined</td>
739
-
740
-
741
-
742
- </tr>
743
- <tr>
744
- <td class="highlight">KbZ</td>
745
-
746
- <td class="normal">:implementation_defined</td>
747
-
748
-
749
-
750
- </tr>
751
- <tr>
752
- <td class="highlight">KbBackspace</td>
753
-
754
- <td class="normal">:implementation_defined</td>
755
-
756
-
757
-
758
- </tr>
759
- <tr>
760
- <td class="highlight">KbDelete</td>
761
-
762
- <td class="normal">:implementation_defined</td>
763
-
764
-
765
-
766
- </tr>
767
- <tr>
768
- <td class="highlight">KbDown</td>
769
-
770
- <td class="normal">:implementation_defined</td>
771
-
772
-
773
-
774
- </tr>
775
- <tr>
776
- <td class="highlight">KbEnd</td>
777
-
778
- <td class="normal">:implementation_defined</td>
779
-
780
-
781
-
782
- </tr>
783
- <tr>
784
- <td class="highlight">KbEnter</td>
785
-
786
- <td class="normal">:implementation_defined</td>
787
-
788
-
789
-
790
- </tr>
791
- <tr>
792
- <td class="highlight">KbEscape</td>
793
-
794
- <td class="normal">:implementation_defined</td>
795
-
796
-
797
-
798
- </tr>
799
- <tr>
800
- <td class="highlight">KbF1</td>
801
-
802
- <td class="normal">:implementation_defined</td>
803
-
804
-
805
-
806
- </tr>
807
- <tr>
808
- <td class="highlight">KbF10</td>
809
-
810
- <td class="normal">:implementation_defined</td>
811
-
812
-
813
-
814
- </tr>
815
- <tr>
816
- <td class="highlight">KbF11</td>
817
-
818
- <td class="normal">:implementation_defined</td>
819
-
820
-
821
-
822
- </tr>
823
- <tr>
824
- <td class="highlight">KbF12</td>
825
-
826
- <td class="normal">:implementation_defined</td>
827
-
828
-
829
-
830
- </tr>
831
- <tr>
832
- <td class="highlight">KbF2</td>
833
-
834
- <td class="normal">:implementation_defined</td>
835
-
836
-
837
-
838
- </tr>
839
- <tr>
840
- <td class="highlight">KbF3</td>
841
-
842
- <td class="normal">:implementation_defined</td>
843
-
844
-
845
-
846
- </tr>
847
- <tr>
848
- <td class="highlight">KbF4</td>
849
-
850
- <td class="normal">:implementation_defined</td>
851
-
852
-
853
-
854
- </tr>
855
- <tr>
856
- <td class="highlight">KbF5</td>
857
-
858
- <td class="normal">:implementation_defined</td>
859
-
860
-
861
-
862
- </tr>
863
- <tr>
864
- <td class="highlight">KbF6</td>
865
-
866
- <td class="normal">:implementation_defined</td>
867
-
868
-
869
-
870
- </tr>
871
- <tr>
872
- <td class="highlight">KbF7</td>
873
-
874
- <td class="normal">:implementation_defined</td>
875
-
876
-
877
-
878
- </tr>
879
- <tr>
880
- <td class="highlight">KbF8</td>
881
-
882
- <td class="normal">:implementation_defined</td>
883
-
884
-
885
-
886
- </tr>
887
- <tr>
888
- <td class="highlight">KbF9</td>
889
-
890
- <td class="normal">:implementation_defined</td>
891
-
892
-
893
-
894
- </tr>
895
- <tr>
896
- <td class="highlight">KbHome</td>
897
-
898
- <td class="normal">:implementation_defined</td>
899
-
900
-
901
-
902
- </tr>
903
- <tr>
904
- <td class="highlight">KbInsert</td>
905
-
906
- <td class="normal">:implementation_defined</td>
907
-
908
-
909
-
910
- </tr>
911
- <tr>
912
- <td class="highlight">KbLeft</td>
913
-
914
- <td class="normal">:implementation_defined</td>
915
-
916
-
917
-
918
- </tr>
919
- <tr>
920
- <td class="highlight">KbLeftAlt</td>
921
-
922
- <td class="normal">:implementation_defined</td>
923
-
924
-
925
-
926
- </tr>
927
- <tr>
928
- <td class="highlight">KbLeftControl</td>
929
-
930
- <td class="normal">:implementation_defined</td>
931
-
932
-
933
-
934
- </tr>
935
- <tr>
936
- <td class="highlight">KbLeftShift</td>
937
-
938
- <td class="normal">:implementation_defined</td>
939
-
940
-
941
-
942
- </tr>
943
- <tr>
944
- <td class="highlight">KbNumpad0</td>
945
-
946
- <td class="normal">:implementation_defined</td>
947
-
948
-
949
-
950
- </tr>
951
- <tr>
952
- <td class="highlight">KbNumpad1</td>
953
-
954
- <td class="normal">:implementation_defined</td>
955
-
956
-
957
-
958
- </tr>
959
- <tr>
960
- <td class="highlight">KbNumpad2</td>
961
-
962
- <td class="normal">:implementation_defined</td>
963
-
964
-
965
-
966
- </tr>
967
- <tr>
968
- <td class="highlight">KbNumpad3</td>
969
-
970
- <td class="normal">:implementation_defined</td>
971
-
972
-
973
-
974
- </tr>
975
- <tr>
976
- <td class="highlight">KbNumpad4</td>
977
-
978
- <td class="normal">:implementation_defined</td>
979
-
980
-
981
-
982
- </tr>
983
- <tr>
984
- <td class="highlight">KbNumpad5</td>
985
-
986
- <td class="normal">:implementation_defined</td>
987
-
988
-
989
-
990
- </tr>
991
- <tr>
992
- <td class="highlight">KbNumpad6</td>
993
-
994
- <td class="normal">:implementation_defined</td>
995
-
996
-
997
-
998
- </tr>
999
- <tr>
1000
- <td class="highlight">KbNumpad7</td>
1001
-
1002
- <td class="normal">:implementation_defined</td>
1003
-
1004
-
1005
-
1006
- </tr>
1007
- <tr>
1008
- <td class="highlight">KbNumpad8</td>
1009
-
1010
- <td class="normal">:implementation_defined</td>
1011
-
1012
-
1013
-
1014
- </tr>
1015
- <tr>
1016
- <td class="highlight">KbNumpad9</td>
1017
-
1018
- <td class="normal">:implementation_defined</td>
1019
-
1020
-
1021
-
1022
- </tr>
1023
- <tr>
1024
- <td class="highlight">KbNumpadAdd</td>
1025
-
1026
- <td class="normal">:implementation_defined</td>
1027
-
1028
-
1029
-
1030
- </tr>
1031
- <tr>
1032
- <td class="highlight">KbNumpadDivide</td>
1033
-
1034
- <td class="normal">:implementation_defined</td>
1035
-
1036
-
1037
-
1038
- </tr>
1039
- <tr>
1040
- <td class="highlight">KbNumpadMultiply</td>
1041
-
1042
- <td class="normal">:implementation_defined</td>
1043
-
1044
-
1045
-
1046
- </tr>
1047
- <tr>
1048
- <td class="highlight">KbNumpadSubtract</td>
1049
-
1050
- <td class="normal">:implementation_defined</td>
1051
-
1052
-
1053
-
1054
- </tr>
1055
- <tr>
1056
- <td class="highlight">KbPageDown</td>
1057
-
1058
- <td class="normal">:implementation_defined</td>
1059
-
1060
-
1061
-
1062
- </tr>
1063
- <tr>
1064
- <td class="highlight">KbPageUp</td>
1065
-
1066
- <td class="normal">:implementation_defined</td>
1067
-
1068
-
1069
-
1070
- </tr>
1071
- <tr>
1072
- <td class="highlight">KbReturn</td>
1073
-
1074
- <td class="normal">:implementation_defined</td>
1075
-
1076
-
1077
-
1078
- </tr>
1079
- <tr>
1080
- <td class="highlight">KbRight</td>
1081
-
1082
- <td class="normal">:implementation_defined</td>
1083
-
1084
-
1085
-
1086
- </tr>
1087
- <tr>
1088
- <td class="highlight">KbRightAlt</td>
1089
-
1090
- <td class="normal">:implementation_defined</td>
1091
-
1092
-
1093
-
1094
- </tr>
1095
- <tr>
1096
- <td class="highlight">KbRightControl</td>
1097
-
1098
- <td class="normal">:implementation_defined</td>
1099
-
1100
-
1101
-
1102
- </tr>
1103
- <tr>
1104
- <td class="highlight">KbRightShift</td>
1105
-
1106
- <td class="normal">:implementation_defined</td>
1107
-
1108
-
1109
-
1110
- </tr>
1111
- <tr>
1112
- <td class="highlight">KbSpace</td>
1113
-
1114
- <td class="normal">:implementation_defined</td>
1115
-
1116
-
1117
-
1118
- </tr>
1119
- <tr>
1120
- <td class="highlight">KbTab</td>
1121
-
1122
- <td class="normal">:implementation_defined</td>
1123
-
1124
-
1125
-
1126
- </tr>
1127
- <tr>
1128
- <td class="highlight">KbUp</td>
1129
-
1130
- <td class="normal">:implementation_defined</td>
1131
-
1132
-
1133
-
1134
- </tr>
1135
- <tr>
1136
- <td class="highlight">MsLeft</td>
1137
-
1138
- <td class="normal">:implementation_defined</td>
1139
-
1140
-
1141
-
1142
- </tr>
1143
- <tr>
1144
- <td class="highlight">MsMiddle</td>
1145
-
1146
- <td class="normal">:implementation_defined</td>
1147
-
1148
-
1149
-
1150
- </tr>
1151
- <tr>
1152
- <td class="highlight">MsRight</td>
1153
-
1154
- <td class="normal">:implementation_defined</td>
1155
-
1156
-
1157
-
1158
- </tr>
1159
- <tr>
1160
- <td class="highlight">MsWheelDown</td>
1161
-
1162
- <td class="normal">:implementation_defined</td>
1163
-
1164
-
1165
-
1166
- </tr>
1167
- <tr>
1168
- <td class="highlight">MsWheelUp</td>
1169
-
1170
- <td class="normal">:implementation_defined</td>
1171
-
1172
-
1173
-
1174
- </tr>
1175
- <tr>
1176
- <td class="highlight">GpButton0</td>
1177
-
1178
- <td class="normal">:implementation_defined</td>
1179
-
1180
-
1181
-
1182
- </tr>
1183
- <tr>
1184
- <td class="highlight">GpButton1</td>
1185
-
1186
- <td class="normal">:implementation_defined</td>
1187
-
1188
-
1189
-
1190
- </tr>
1191
- <tr>
1192
- <td class="highlight">GpButton10</td>
1193
-
1194
- <td class="normal">:implementation_defined</td>
1195
-
1196
-
1197
-
1198
- </tr>
1199
- <tr>
1200
- <td class="highlight">GpButton11</td>
1201
-
1202
- <td class="normal">:implementation_defined</td>
1203
-
1204
-
1205
-
1206
- </tr>
1207
- <tr>
1208
- <td class="highlight">GpButton12</td>
1209
-
1210
- <td class="normal">:implementation_defined</td>
1211
-
1212
-
1213
-
1214
- </tr>
1215
- <tr>
1216
- <td class="highlight">GpButton13</td>
1217
-
1218
- <td class="normal">:implementation_defined</td>
1219
-
1220
-
1221
-
1222
- </tr>
1223
- <tr>
1224
- <td class="highlight">GpButton14</td>
1225
-
1226
- <td class="normal">:implementation_defined</td>
1227
-
1228
-
1229
-
1230
- </tr>
1231
- <tr>
1232
- <td class="highlight">GpButton15</td>
1233
-
1234
- <td class="normal">:implementation_defined</td>
1235
-
1236
-
1237
-
1238
- </tr>
1239
- <tr>
1240
- <td class="highlight">GpButton2</td>
1241
-
1242
- <td class="normal">:implementation_defined</td>
1243
-
1244
-
1245
-
1246
- </tr>
1247
- <tr>
1248
- <td class="highlight">GpButton3</td>
1249
-
1250
- <td class="normal">:implementation_defined</td>
1251
-
1252
-
1253
-
1254
- </tr>
1255
- <tr>
1256
- <td class="highlight">GpButton4</td>
1257
-
1258
- <td class="normal">:implementation_defined</td>
1259
-
1260
-
1261
-
1262
- </tr>
1263
- <tr>
1264
- <td class="highlight">GpButton5</td>
1265
-
1266
- <td class="normal">:implementation_defined</td>
1267
-
1268
-
1269
-
1270
- </tr>
1271
- <tr>
1272
- <td class="highlight">GpButton6</td>
1273
-
1274
- <td class="normal">:implementation_defined</td>
1275
-
1276
-
1277
-
1278
- </tr>
1279
- <tr>
1280
- <td class="highlight">GpButton7</td>
1281
-
1282
- <td class="normal">:implementation_defined</td>
1283
-
1284
-
1285
-
1286
- </tr>
1287
- <tr>
1288
- <td class="highlight">GpButton8</td>
1289
-
1290
- <td class="normal">:implementation_defined</td>
1291
-
1292
-
1293
-
1294
- </tr>
1295
- <tr>
1296
- <td class="highlight">GpButton9</td>
1297
-
1298
- <td class="normal">:implementation_defined</td>
1299
-
1300
-
1301
-
1302
- </tr>
1303
- <tr>
1304
- <td class="highlight">GpDown</td>
1305
-
1306
- <td class="normal">:implementation_defined</td>
1307
-
1308
-
1309
-
1310
- </tr>
1311
- <tr>
1312
- <td class="highlight">GpLeft</td>
1313
-
1314
- <td class="normal">:implementation_defined</td>
1315
-
1316
-
1317
-
1318
- </tr>
1319
- <tr>
1320
- <td class="highlight">GpRight</td>
1321
-
1322
- <td class="normal">:implementation_defined</td>
1323
-
1324
-
1325
-
1326
- </tr>
1327
- <tr>
1328
- <td class="highlight">GpUp</td>
1329
-
1330
- <td class="normal">:implementation_defined</td>
1331
-
1332
-
1333
-
1334
- </tr>
1335
- </table></p>
1336
-
1337
-
1338
-
1339
-
1340
- <h1>Public Instance Methods</h1>
1341
-
1342
-
1343
- <a class="small" name="M000008"><br/></a>
1344
- <div class="method_block"><h3>
1345
- <a href='#M000008'>
1346
-
1347
-
1348
- angle
1349
-
1350
- (x1, y1, x2, y2)
1351
-
1352
- </a>
1353
- </h3>
1354
- <p>
1355
- Returns the <a href="Gosu.html#M000008">angle</a> from point 1 to point 2
1356
- in degrees, where 0.0 means upwards. Returns 0 if both points are equal.
1357
- </p>
1358
-
1359
- <p class="source_link" id="M000008-show-link"><a href="#" onclick="toggle('M000008-source'); toggleText('M000008-link'); return false;" id="M000008-link">Show source...</a></p><div class="source" id="M000008-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 456</span>
1360
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1361
- </div>
1362
-
1363
- <a class="small" name="M000009"><br/></a>
1364
- <div class="method_block"><h3>
1365
- <a href='#M000009'>
1366
-
1367
-
1368
- angle_diff
1369
-
1370
- (angle1, angle2)
1371
-
1372
- </a>
1373
- </h3>
1374
- <p>
1375
- Returns the smallest <a href="Gosu.html#M000008">angle</a> that can be
1376
- added to angle1 to get to angle2 (can be negative if counter-clockwise
1377
- movement is shorter).
1378
- </p>
1379
-
1380
- <p class="source_link" id="M000009-show-link"><a href="#" onclick="toggle('M000009-source'); toggleText('M000009-link'); return false;" id="M000009-link">Show source...</a></p><div class="source" id="M000009-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 459</span>
1381
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">angle_diff</span>(<span class="ruby-identifier">angle1</span>, <span class="ruby-identifier">angle2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1382
- </div>
1383
-
1384
- <a class="small" name="M000012"><br/></a>
1385
- <div class="method_block"><h3>
1386
- <a href='#M000012'>
1387
-
1388
-
1389
- default_font_name
1390
-
1391
- ()
1392
-
1393
- </a>
1394
- </h3>
1395
- <p>
1396
- Returns the name of a neutral font that is available on the current
1397
- platform.
1398
- </p>
1399
-
1400
- <p class="source_link" id="M000012-show-link"><a href="#" onclick="toggle('M000012-source'); toggleText('M000012-link'); return false;" id="M000012-link">Show source...</a></p><div class="source" id="M000012-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 469</span>
1401
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_font_name</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1402
- </div>
1403
-
1404
- <a class="small" name="M000010"><br/></a>
1405
- <div class="method_block"><h3>
1406
- <a href='#M000010'>
1407
-
1408
-
1409
- distance
1410
-
1411
- (x1, y1, x2, y2)
1412
-
1413
- </a>
1414
- </h3>
1415
- <p>
1416
- Returns the <a href="Gosu.html#M000010">distance</a> between two points.
1417
- </p>
1418
-
1419
- <p class="source_link" id="M000010-show-link"><a href="#" onclick="toggle('M000010-source'); toggleText('M000010-link'); return false;" id="M000010-link">Show source...</a></p><div class="source" id="M000010-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 462</span>
1420
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">distance</span>(<span class="ruby-identifier">x1</span>, <span class="ruby-identifier">y1</span>, <span class="ruby-identifier">x2</span>, <span class="ruby-identifier">y2</span>); <span class="ruby-keyword kw">end</span></pre></div>
1421
- </div>
1422
-
1423
- <a class="small" name="M000011"><br/></a>
1424
- <div class="method_block"><h3>
1425
- <a href='#M000011'>
1426
-
1427
-
1428
- milliseconds
1429
-
1430
- ()
1431
-
1432
- </a>
1433
- </h3>
1434
- <p>
1435
- Incrementing, possibly wrapping millisecond timer.
1436
- </p>
1437
-
1438
- <p class="source_link" id="M000011-show-link"><a href="#" onclick="toggle('M000011-source'); toggleText('M000011-link'); return false;" id="M000011-link">Show source...</a></p><div class="source" id="M000011-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 465</span>
1439
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">milliseconds</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1440
- </div>
1441
-
1442
- <a class="small" name="M000006"><br/></a>
1443
- <div class="method_block"><h3>
1444
- <a href='#M000006'>
1445
-
1446
-
1447
- offset_x
1448
-
1449
- (angle, dist)
1450
-
1451
- </a>
1452
- </h3>
1453
- <p>
1454
- Returns the horizontal <a href="Gosu.html#M000010">distance</a> between the
1455
- origin and the point to which you would get if you moved radius pixels in
1456
- the direction specified by <a href="Gosu.html#M000008">angle</a>.
1457
- </p>
1458
-
1459
- <p class="source_link" id="M000006-show-link"><a href="#" onclick="toggle('M000006-source'); toggleText('M000006-link'); return false;" id="M000006-link">Show source...</a></p><div class="source" id="M000006-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 450</span>
1460
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_x</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1461
- </div>
1462
-
1463
- <a class="small" name="M000007"><br/></a>
1464
- <div class="method_block"><h3>
1465
- <a href='#M000007'>
1466
-
1467
-
1468
- offset_y
1469
-
1470
- (angle, dist)
1471
-
1472
- </a>
1473
- </h3>
1474
- <p>
1475
- Returns the vertical <a href="Gosu.html#M000010">distance</a> between the
1476
- origin and the point to which you would get if you moved radius pixels in
1477
- the direction specified by <a href="Gosu.html#M000008">angle</a>.
1478
- </p>
1479
-
1480
- <p class="source_link" id="M000007-show-link"><a href="#" onclick="toggle('M000007-source'); toggleText('M000007-link'); return false;" id="M000007-link">Show source...</a></p><div class="source" id="M000007-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 453</span>
1481
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">offset_y</span>(<span class="ruby-identifier">angle</span>, <span class="ruby-identifier">dist</span>); <span class="ruby-keyword kw">end</span></pre></div>
1482
- </div>
1483
-
1484
- <a class="small" name="M000005"><br/></a>
1485
- <div class="method_block"><h3>
1486
- <a href='#M000005'>
1487
-
1488
-
1489
- random
1490
-
1491
- (min, max)
1492
-
1493
- </a>
1494
- </h3>
1495
- <p>
1496
- Returns a <a href="Gosu.html#M000005">random</a> double between min
1497
- (inclusive) and max (exclusive).
1498
- </p>
1499
-
1500
- <p class="source_link" id="M000005-show-link"><a href="#" onclick="toggle('M000005-source'); toggleText('M000005-link'); return false;" id="M000005-link">Show source...</a></p><div class="source" id="M000005-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 447</span>
1501
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">random</span>(<span class="ruby-identifier">min</span>, <span class="ruby-identifier">max</span>); <span class="ruby-keyword kw">end</span></pre></div>
1502
- </div>
1503
-
1504
- <a class="small" name="M000014"><br/></a>
1505
- <div class="method_block"><h3>
1506
- <a href='#M000014'>
1507
-
1508
-
1509
- screen_height
1510
-
1511
- ()
1512
-
1513
- </a>
1514
- </h3>
1515
- <p>
1516
- Returns the height, in pixels, of the user&#8216;s primary screen.
1517
- </p>
1518
-
1519
- <p class="source_link" id="M000014-show-link"><a href="#" onclick="toggle('M000014-source'); toggleText('M000014-link'); return false;" id="M000014-link">Show source...</a></p><div class="source" id="M000014-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 475</span>
1520
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_height</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1521
- </div>
1522
-
1523
- <a class="small" name="M000013"><br/></a>
1524
- <div class="method_block"><h3>
1525
- <a href='#M000013'>
1526
-
1527
-
1528
- screen_width
1529
-
1530
- ()
1531
-
1532
- </a>
1533
- </h3>
1534
- <p>
1535
- Returns the width, in pixels, of the user&#8216;s primary screen.
1536
- </p>
1537
-
1538
- <p class="source_link" id="M000013-show-link"><a href="#" onclick="toggle('M000013-source'); toggleText('M000013-link'); return false;" id="M000013-link">Show source...</a></p><div class="source" id="M000013-source"><pre><span class="ruby-comment cmt"># File reference/gosu.rb, line 472</span>
1539
- <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">screen_width</span>(); <span class="ruby-keyword kw">end</span></pre></div>
1540
- </div>
1541
-
1542
-
1543
-
1544
-
1545
-
1546
- </div><div class="clear" id="footer">Allison 2 &copy; 2007 <a href="http://cloudbur.st">Cloudburst, LLC</a><br/>slightly adapted for the Gosu project by Julian Raschke</div></div></body></html>