gosu 0.8.6-x86-mingw32 → 0.8.7-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gosu/Audio.hpp +171 -171
- data/Gosu/Bitmap.hpp +96 -96
- data/Gosu/Color.hpp +204 -204
- data/Gosu/Directories.hpp +36 -36
- data/Gosu/Font.hpp +83 -83
- data/Gosu/Gosu.hpp +34 -34
- data/Gosu/Graphics.hpp +115 -115
- data/Gosu/GraphicsBase.hpp +110 -110
- data/Gosu/IO.hpp +269 -269
- data/Gosu/Image.hpp +122 -122
- data/Gosu/ImageData.hpp +61 -61
- data/Gosu/Input.hpp +149 -149
- data/Gosu/Inspection.hpp +14 -14
- data/Gosu/Math.hpp +135 -135
- data/Gosu/Platform.hpp +93 -93
- data/Gosu/Sockets.hpp +156 -156
- data/Gosu/TR1.hpp +56 -56
- data/Gosu/Text.hpp +71 -71
- data/Gosu/TextInput.hpp +70 -70
- data/Gosu/Utility.hpp +28 -28
- data/Gosu/Version.hpp +19 -19
- data/Gosu/Window.hpp +145 -145
- data/examples/ChipmunkIntegration.rb +275 -275
- data/examples/CptnRuby.rb +223 -223
- data/examples/GosuZen.rb +68 -68
- data/examples/MoreChipmunkAndRMagick.rb +155 -155
- data/examples/OpenGLIntegration.rb +225 -225
- data/examples/RMagickIntegration.rb +417 -417
- data/examples/TextInput.rb +154 -154
- data/examples/Tutorial.rb +130 -130
- data/examples/media/Beep.wav +0 -0
- data/examples/media/CptnRuby Map.txt b/data/examples/media/CptnRuby → Map.txt +0 -0
- data/examples/media/Explosion.wav +0 -0
- data/examples/media/Landscape.svg +9 -9
- data/examples/media/Space.png +0 -0
- data/examples/media/Star.png +0 -0
- data/examples/media/Starfighter.bmp +0 -0
- data/lib/1.8/gosu.so +0 -0
- data/lib/1.9/gosu.so +0 -0
- data/lib/2.0/gosu.so +0 -0
- data/lib/2.1/gosu.so +0 -0
- data/lib/FreeImage.dll +0 -0
- data/lib/OpenAL32.dll +0 -0
- data/lib/gosu.rb +19 -16
- data/lib/gosu/patches.rb +81 -81
- data/lib/gosu/preview.rb +143 -139
- data/lib/gosu/run.rb +11 -11
- data/lib/gosu/swig_patches.rb +60 -60
- data/lib/gosu/zen.rb +89 -89
- metadata +5 -5
data/examples/media/Beep.wav
CHANGED
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,10 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" clip-rule="evenodd" stroke-miterlimit="10" viewBox="0 0 850.39 637.80">
|
3
|
-
<desc>SVG generated by Lineform</desc>
|
4
|
-
<defs/>
|
5
|
-
<g>
|
6
|
-
<rect width="940.00" height="734.00" x="-25.50" y="-55.50" fill="#5FB7FF" stroke="#000000" stroke-width="2.20"/>
|
7
|
-
<path d="M 223.50 49.00 C 171.16 49.00 118.84 59.51 78.91 80.50 C -0.96 122.48 -0.96 190.52 78.91 232.50 C 134.24 261.59 213.37 270.50 283.34 259.28 C 350.32 290.78 452.18 289.47 516.06 255.19 C 582.65 219.45 582.65 161.55 516.06 125.81 C 482.95 108.04 439.59 99.12 396.19 99.03 C 388.26 92.46 378.99 86.23 368.09 80.50 C 328.16 59.51 275.84 49.00 223.50 49.00 Z M 223.50 49.00 " fill="#FFFFFF" stroke="#BFBFBF" stroke-width="6.00"/>
|
8
|
-
<path d="M 735.48 183.00 C 699.52 183.00 663.55 187.05 636.11 195.16 C 607.54 203.59 593.99 214.76 595.17 225.81 C 561.74 227.76 529.60 233.37 503.83 242.72 C 438.71 266.35 438.71 304.65 503.83 328.28 C 568.96 351.91 674.56 351.91 739.69 328.28 C 787.65 310.88 800.17 285.50 777.48 263.91 C 798.41 261.97 818.28 258.74 834.86 253.84 C 889.73 237.64 889.73 211.36 834.86 195.16 C 807.42 187.05 771.44 183.00 735.48 183.00 Z M 735.48 183.00 " fill="#FFFFFF" stroke="#BFBFBF" stroke-width="6.00"/>
|
9
|
-
</g>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" clip-rule="evenodd" stroke-miterlimit="10" viewBox="0 0 850.39 637.80">
|
3
|
+
<desc>SVG generated by Lineform</desc>
|
4
|
+
<defs/>
|
5
|
+
<g>
|
6
|
+
<rect width="940.00" height="734.00" x="-25.50" y="-55.50" fill="#5FB7FF" stroke="#000000" stroke-width="2.20"/>
|
7
|
+
<path d="M 223.50 49.00 C 171.16 49.00 118.84 59.51 78.91 80.50 C -0.96 122.48 -0.96 190.52 78.91 232.50 C 134.24 261.59 213.37 270.50 283.34 259.28 C 350.32 290.78 452.18 289.47 516.06 255.19 C 582.65 219.45 582.65 161.55 516.06 125.81 C 482.95 108.04 439.59 99.12 396.19 99.03 C 388.26 92.46 378.99 86.23 368.09 80.50 C 328.16 59.51 275.84 49.00 223.50 49.00 Z M 223.50 49.00 " fill="#FFFFFF" stroke="#BFBFBF" stroke-width="6.00"/>
|
8
|
+
<path d="M 735.48 183.00 C 699.52 183.00 663.55 187.05 636.11 195.16 C 607.54 203.59 593.99 214.76 595.17 225.81 C 561.74 227.76 529.60 233.37 503.83 242.72 C 438.71 266.35 438.71 304.65 503.83 328.28 C 568.96 351.91 674.56 351.91 739.69 328.28 C 787.65 310.88 800.17 285.50 777.48 263.91 C 798.41 261.97 818.28 258.74 834.86 253.84 C 889.73 237.64 889.73 211.36 834.86 195.16 C 807.42 187.05 771.44 183.00 735.48 183.00 Z M 735.48 183.00 " fill="#FFFFFF" stroke="#BFBFBF" stroke-width="6.00"/>
|
9
|
+
</g>
|
10
10
|
</svg>
|
data/examples/media/Space.png
CHANGED
File without changes
|
data/examples/media/Star.png
CHANGED
File without changes
|
File without changes
|
data/lib/1.8/gosu.so
CHANGED
Binary file
|
data/lib/1.9/gosu.so
CHANGED
Binary file
|
data/lib/2.0/gosu.so
CHANGED
Binary file
|
data/lib/2.1/gosu.so
CHANGED
Binary file
|
data/lib/FreeImage.dll
CHANGED
Binary file
|
data/lib/OpenAL32.dll
CHANGED
Binary file
|
data/lib/gosu.rb
CHANGED
@@ -1,16 +1,19 @@
|
|
1
|
-
require 'rbconfig'
|
2
|
-
|
3
|
-
if RUBY_PLATFORM =~ /mswin
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
require "gosu
|
1
|
+
require 'rbconfig'
|
2
|
+
|
3
|
+
if RUBY_PLATFORM =~ /mswin$|mingw32|mingw64|win32\-|\-win32/ then
|
4
|
+
binary_path = File.dirname(__FILE__)
|
5
|
+
# 64-bit builds of Windows use "x64-mingw32" as RUBY_PLATFORM
|
6
|
+
binary_path += '64' if RUBY_PLATFORM =~ /^x64-/
|
7
|
+
|
8
|
+
# Add this gem to the PATH on Windows so that bundled DLLs can be found.
|
9
|
+
ENV['PATH'] = "#{binary_path};#{ENV['PATH']}"
|
10
|
+
|
11
|
+
# Add the correct directory
|
12
|
+
RUBY_VERSION =~ /(\d+.\d+)/
|
13
|
+
$LOAD_PATH.unshift "#{binary_path}/#{$1}"
|
14
|
+
end
|
15
|
+
|
16
|
+
require "gosu.#{RbConfig::CONFIG['DLEXT']}"
|
17
|
+
|
18
|
+
require "gosu/swig_patches"
|
19
|
+
require "gosu/patches"
|
data/lib/gosu/patches.rb
CHANGED
@@ -1,81 +1,81 @@
|
|
1
|
-
# Extend Numeric with simple angle conversion methods.
|
2
|
-
class ::Numeric
|
3
|
-
def degrees_to_radians
|
4
|
-
self * Math::PI / 180.0
|
5
|
-
end
|
6
|
-
def radians_to_degrees
|
7
|
-
self * 180.0 / Math::PI
|
8
|
-
end
|
9
|
-
def gosu_to_radians
|
10
|
-
(self - 90) * Math::PI / 180.0
|
11
|
-
end
|
12
|
-
def radians_to_gosu
|
13
|
-
self * 180.0 / Math::PI + 90
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
# Backwards compatibility: import constants into Gosu::Button.
|
18
|
-
module Gosu::Button
|
19
|
-
Gosu.constants.each { |c| const_set(c, Gosu.const_get(c)) }
|
20
|
-
end
|
21
|
-
|
22
|
-
# Backwards compatibility: Window arguments to Sample and Song
|
23
|
-
class Gosu::Sample
|
24
|
-
alias initialize_ initialize
|
25
|
-
|
26
|
-
def initialize(*args)
|
27
|
-
args.shift if args.first.is_a? Gosu::Window
|
28
|
-
initialize_(*args)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
class Gosu::Song
|
32
|
-
alias initialize_ initialize
|
33
|
-
|
34
|
-
def initialize(*args)
|
35
|
-
args.shift if args.first.is_a? Gosu::Window
|
36
|
-
initialize_(*args)
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
# Color constants (SWIG messes up constants somehow)
|
41
|
-
class Gosu::Color
|
42
|
-
class Constant < Gosu::Color
|
43
|
-
private
|
44
|
-
def alpha=; end
|
45
|
-
def red=; end
|
46
|
-
def green=; end
|
47
|
-
def blue=; end
|
48
|
-
def hue=; end
|
49
|
-
def saturation=; end
|
50
|
-
def value=; end
|
51
|
-
end
|
52
|
-
|
53
|
-
NONE = Gosu::Color::Constant.argb(0x00000000)
|
54
|
-
BLACK = Gosu::Color::Constant.argb(0xff000000)
|
55
|
-
GRAY = Gosu::Color::Constant.argb(0xff808080)
|
56
|
-
WHITE = Gosu::Color::Constant.argb(0xffffffff)
|
57
|
-
AQUA = Gosu::Color::Constant.argb(0xff00ffff)
|
58
|
-
RED = Gosu::Color::Constant.argb(0xffff0000)
|
59
|
-
GREEN = Gosu::Color::Constant.argb(0xff00ff00)
|
60
|
-
BLUE = Gosu::Color::Constant.argb(0xff0000ff)
|
61
|
-
YELLOW = Gosu::Color::Constant.argb(0xffffff00)
|
62
|
-
FUCHSIA = Gosu::Color::Constant.argb(0xffff00ff)
|
63
|
-
CYAN = Gosu::Color::Constant.argb(0xff00ffff)
|
64
|
-
end
|
65
|
-
|
66
|
-
# Instance methods for button_id_to_char and char_to_button_id
|
67
|
-
class Gosu::Window
|
68
|
-
def button_id_to_char(id)
|
69
|
-
self.class.button_id_to_char(id)
|
70
|
-
end
|
71
|
-
|
72
|
-
def char_to_button_id(ch)
|
73
|
-
self.class.char_to_button_id(ch)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
# Release OpenAL resources during Ruby's shutdown, not Gosu's.
|
78
|
-
at_exit do
|
79
|
-
Gosu::Song.current_song.stop if Gosu::Song.current_song
|
80
|
-
Gosu::_release_all_openal_resources
|
81
|
-
end
|
1
|
+
# Extend Numeric with simple angle conversion methods.
|
2
|
+
class ::Numeric
|
3
|
+
def degrees_to_radians
|
4
|
+
self * Math::PI / 180.0
|
5
|
+
end
|
6
|
+
def radians_to_degrees
|
7
|
+
self * 180.0 / Math::PI
|
8
|
+
end
|
9
|
+
def gosu_to_radians
|
10
|
+
(self - 90) * Math::PI / 180.0
|
11
|
+
end
|
12
|
+
def radians_to_gosu
|
13
|
+
self * 180.0 / Math::PI + 90
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
# Backwards compatibility: import constants into Gosu::Button.
|
18
|
+
module Gosu::Button
|
19
|
+
Gosu.constants.each { |c| const_set(c, Gosu.const_get(c)) }
|
20
|
+
end
|
21
|
+
|
22
|
+
# Backwards compatibility: Window arguments to Sample and Song
|
23
|
+
class Gosu::Sample
|
24
|
+
alias initialize_ initialize
|
25
|
+
|
26
|
+
def initialize(*args)
|
27
|
+
args.shift if args.first.is_a? Gosu::Window
|
28
|
+
initialize_(*args)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
class Gosu::Song
|
32
|
+
alias initialize_ initialize
|
33
|
+
|
34
|
+
def initialize(*args)
|
35
|
+
args.shift if args.first.is_a? Gosu::Window
|
36
|
+
initialize_(*args)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# Color constants (SWIG messes up constants somehow)
|
41
|
+
class Gosu::Color
|
42
|
+
class Constant < Gosu::Color
|
43
|
+
private
|
44
|
+
def alpha=; end
|
45
|
+
def red=; end
|
46
|
+
def green=; end
|
47
|
+
def blue=; end
|
48
|
+
def hue=; end
|
49
|
+
def saturation=; end
|
50
|
+
def value=; end
|
51
|
+
end
|
52
|
+
|
53
|
+
NONE = Gosu::Color::Constant.argb(0x00000000)
|
54
|
+
BLACK = Gosu::Color::Constant.argb(0xff000000)
|
55
|
+
GRAY = Gosu::Color::Constant.argb(0xff808080)
|
56
|
+
WHITE = Gosu::Color::Constant.argb(0xffffffff)
|
57
|
+
AQUA = Gosu::Color::Constant.argb(0xff00ffff)
|
58
|
+
RED = Gosu::Color::Constant.argb(0xffff0000)
|
59
|
+
GREEN = Gosu::Color::Constant.argb(0xff00ff00)
|
60
|
+
BLUE = Gosu::Color::Constant.argb(0xff0000ff)
|
61
|
+
YELLOW = Gosu::Color::Constant.argb(0xffffff00)
|
62
|
+
FUCHSIA = Gosu::Color::Constant.argb(0xffff00ff)
|
63
|
+
CYAN = Gosu::Color::Constant.argb(0xff00ffff)
|
64
|
+
end
|
65
|
+
|
66
|
+
# Instance methods for button_id_to_char and char_to_button_id
|
67
|
+
class Gosu::Window
|
68
|
+
def button_id_to_char(id)
|
69
|
+
self.class.button_id_to_char(id)
|
70
|
+
end
|
71
|
+
|
72
|
+
def char_to_button_id(ch)
|
73
|
+
self.class.char_to_button_id(ch)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Release OpenAL resources during Ruby's shutdown, not Gosu's.
|
78
|
+
at_exit do
|
79
|
+
Gosu::Song.current_song.stop if Gosu::Song.current_song
|
80
|
+
Gosu::_release_all_openal_resources
|
81
|
+
end
|
data/lib/gosu/preview.rb
CHANGED
@@ -1,139 +1,143 @@
|
|
1
|
-
require 'gosu'
|
2
|
-
|
3
|
-
# Wrapper around Gosu 0.
|
4
|
-
|
5
|
-
module Gosu
|
6
|
-
class Font
|
7
|
-
alias :
|
8
|
-
|
9
|
-
def initialize *args
|
10
|
-
if args.first.is_a? Gosu::Window then
|
11
|
-
|
12
|
-
else
|
13
|
-
height = args[0]
|
14
|
-
options = args[1] || {}
|
15
|
-
name = options[:name] || Gosu::default_font_name
|
16
|
-
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
class Window
|
22
|
-
alias :
|
23
|
-
|
24
|
-
def initialize width, height, *args
|
25
|
-
if args.empty? or args.first.is_a? Hash then
|
26
|
-
options = args.first || {}
|
27
|
-
fullscreen = !!options[:fullscreen]
|
28
|
-
update_interval = options[:update_interval] || 16.66
|
29
|
-
else
|
30
|
-
fullscreen, update_interval = *args
|
31
|
-
end
|
32
|
-
$window =
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
class Image
|
37
|
-
alias :
|
38
|
-
|
39
|
-
def initialize *args
|
40
|
-
if args.first.is_a? Gosu::Window then
|
41
|
-
|
42
|
-
else
|
43
|
-
source = args[0]
|
44
|
-
tileable = !args[1] || args[1][:tileable]
|
45
|
-
rect = args[1] && args[1][:rect]
|
46
|
-
if rect then
|
47
|
-
|
48
|
-
else
|
49
|
-
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
class <<self
|
55
|
-
alias
|
56
|
-
end
|
57
|
-
|
58
|
-
def self.load_tiles *args
|
59
|
-
if args.first.is_a? Gosu::Window then
|
60
|
-
|
61
|
-
else
|
62
|
-
source = args[0]
|
63
|
-
x, y = args[1..2]
|
64
|
-
tileable = !args[3] || args[3][:tileable]
|
65
|
-
|
66
|
-
end
|
67
|
-
end
|
68
|
-
|
69
|
-
def self.from_text *args
|
70
|
-
if args.first.is_a? Gosu::Window then
|
71
|
-
args.size == 4 ? from_text4(*args) : from_text7(*args)
|
72
|
-
else
|
73
|
-
text = args[0]
|
74
|
-
height = args[1]
|
75
|
-
options = args[2] || {}
|
76
|
-
font = options[:font] || Gosu::default_font_name
|
77
|
-
if width = options[:width] then
|
78
|
-
spacing = options[:spacing] || 0
|
79
|
-
align = options[:align] || :left
|
80
|
-
Gosu::Image.from_text7 $window, text, font, height, spacing, width, align
|
81
|
-
else
|
82
|
-
Gosu::Image.from_text4 $window, text, font, height
|
83
|
-
end
|
84
|
-
end
|
85
|
-
end
|
86
|
-
end
|
87
|
-
|
88
|
-
def self.button_down? id
|
89
|
-
$window.button_down? id
|
90
|
-
end
|
91
|
-
|
92
|
-
def self.mouse_x
|
93
|
-
$window.mouse_x
|
94
|
-
end
|
95
|
-
|
96
|
-
def self.mouse_y
|
97
|
-
$window.mouse_y
|
98
|
-
end
|
99
|
-
|
100
|
-
def self.draw_line *args
|
101
|
-
$window.draw_line *args
|
102
|
-
end
|
103
|
-
|
104
|
-
def self.draw_triangle *args
|
105
|
-
$window.draw_triangle *args
|
106
|
-
end
|
107
|
-
|
108
|
-
def self.draw_quad *args
|
109
|
-
$window.draw_quad *args
|
110
|
-
end
|
111
|
-
|
112
|
-
def self.
|
113
|
-
$window.
|
114
|
-
end
|
115
|
-
|
116
|
-
def self.
|
117
|
-
$window.
|
118
|
-
end
|
119
|
-
|
120
|
-
def self.
|
121
|
-
$window.
|
122
|
-
end
|
123
|
-
|
124
|
-
def self.
|
125
|
-
$window.
|
126
|
-
end
|
127
|
-
|
128
|
-
def self.
|
129
|
-
$window.
|
130
|
-
end
|
131
|
-
|
132
|
-
def self.
|
133
|
-
$window.
|
134
|
-
end
|
135
|
-
|
136
|
-
def self.
|
137
|
-
$window.
|
138
|
-
end
|
139
|
-
|
1
|
+
require 'gosu'
|
2
|
+
|
3
|
+
# Wrapper around Gosu 0.4-0.8 that provides the work-in-progress 0.9 interface
|
4
|
+
|
5
|
+
module Gosu
|
6
|
+
class Font
|
7
|
+
alias :initialize_old :initialize
|
8
|
+
|
9
|
+
def initialize *args
|
10
|
+
if args.first.is_a? Gosu::Window then
|
11
|
+
initialize_old *args
|
12
|
+
else
|
13
|
+
height = args[0]
|
14
|
+
options = args[1] || {}
|
15
|
+
name = options[:name] || Gosu::default_font_name
|
16
|
+
initialize_old $window, name, height
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
class Window
|
22
|
+
alias :initialize_old :initialize
|
23
|
+
|
24
|
+
def initialize width, height, *args
|
25
|
+
if args.empty? or args.first.is_a? Hash then
|
26
|
+
options = args.first || {}
|
27
|
+
fullscreen = !!options[:fullscreen]
|
28
|
+
update_interval = options[:update_interval] || 16.66
|
29
|
+
else
|
30
|
+
fullscreen, update_interval = *args
|
31
|
+
end
|
32
|
+
$window = initialize_old width, height, fullscreen, update_interval
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
class Image
|
37
|
+
alias :initialize_old :initialize
|
38
|
+
|
39
|
+
def initialize *args
|
40
|
+
if args.first.is_a? Gosu::Window then
|
41
|
+
initialize_old *args
|
42
|
+
else
|
43
|
+
source = args[0]
|
44
|
+
tileable = !args[1] || args[1][:tileable]
|
45
|
+
rect = args[1] && args[1][:rect]
|
46
|
+
if rect then
|
47
|
+
initialize_old $window, source, !!tileable, *rect
|
48
|
+
else
|
49
|
+
initialize_old $window, source, !!tileable
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
class <<self
|
55
|
+
alias load_tiles_old load_tiles
|
56
|
+
end
|
57
|
+
|
58
|
+
def self.load_tiles *args
|
59
|
+
if args.first.is_a? Gosu::Window then
|
60
|
+
load_tiles_old *args
|
61
|
+
else
|
62
|
+
source = args[0]
|
63
|
+
x, y = args[1..2]
|
64
|
+
tileable = !args[3] || args[3][:tileable]
|
65
|
+
load_tiles_old $window, source, x, y, !!tileable
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
def self.from_text *args
|
70
|
+
if args.first.is_a? Gosu::Window then
|
71
|
+
args.size == 4 ? from_text4(*args) : from_text7(*args)
|
72
|
+
else
|
73
|
+
text = args[0]
|
74
|
+
height = args[1]
|
75
|
+
options = args[2] || {}
|
76
|
+
font = options[:font] || Gosu::default_font_name
|
77
|
+
if width = options[:width] then
|
78
|
+
spacing = options[:spacing] || 0
|
79
|
+
align = options[:align] || :left
|
80
|
+
Gosu::Image.from_text7 $window, text, font, height, spacing, width, align
|
81
|
+
else
|
82
|
+
Gosu::Image.from_text4 $window, text, font, height
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
def self.button_down? id
|
89
|
+
$window.button_down? id
|
90
|
+
end
|
91
|
+
|
92
|
+
def self.mouse_x
|
93
|
+
$window.mouse_x
|
94
|
+
end
|
95
|
+
|
96
|
+
def self.mouse_y
|
97
|
+
$window.mouse_y
|
98
|
+
end
|
99
|
+
|
100
|
+
def self.draw_line *args
|
101
|
+
$window.draw_line *args
|
102
|
+
end
|
103
|
+
|
104
|
+
def self.draw_triangle *args
|
105
|
+
$window.draw_triangle *args
|
106
|
+
end
|
107
|
+
|
108
|
+
def self.draw_quad *args
|
109
|
+
$window.draw_quad *args
|
110
|
+
end
|
111
|
+
|
112
|
+
def self.draw_rect x, y, width, height, color = 0xffffffff, z, mode = :default
|
113
|
+
$window.draw_quad x, y, color, x + width, y, color, x, y + height, color, x + width, y + height, color, z, mode
|
114
|
+
end
|
115
|
+
|
116
|
+
def self.clip_to *args, &draw
|
117
|
+
$window.clip_to *args, &draw
|
118
|
+
end
|
119
|
+
|
120
|
+
def self.translate *args, &draw
|
121
|
+
$window.translate *args, &draw
|
122
|
+
end
|
123
|
+
|
124
|
+
def self.scale *args, &draw
|
125
|
+
$window.scale *args, &draw
|
126
|
+
end
|
127
|
+
|
128
|
+
def self.rotate *args, &draw
|
129
|
+
$window.rotate *args, &draw
|
130
|
+
end
|
131
|
+
|
132
|
+
def self.transform *args, &draw
|
133
|
+
$window.transform *args, &draw
|
134
|
+
end
|
135
|
+
|
136
|
+
def self.record width, height, &draw
|
137
|
+
$window.record width, height, &draw
|
138
|
+
end
|
139
|
+
|
140
|
+
def self.gl *args, &draw
|
141
|
+
$window.gl *args, &draw
|
142
|
+
end
|
143
|
+
end
|