sgl 0.4.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +254 -234
- data/History.txt +6 -0
- data/Manifest.txt +10 -0
- data/Rakefile +27 -7
- data/examples/cocoa1-basic.rb +14 -14
- data/examples/cocoa10-transparent.rb +26 -26
- data/examples/cocoa11-application.rb +13 -13
- data/examples/cocoa2-draw.rb +23 -23
- data/examples/cocoa3-affine.rb +29 -29
- data/examples/cocoa4-font.rb +24 -24
- data/examples/cocoa5-image.rb +22 -22
- data/examples/cocoa6-sound.rb +24 -24
- data/examples/cocoa7-movie.rb +40 -40
- data/examples/cocoa8-movieoverlay.rb +42 -42
- data/examples/cocoa9-streaming.rb +40 -40
- data/examples/opengl1-basic.rb +14 -14
- data/examples/opengl11-application.rb +13 -13
- data/examples/opengl2-draw.rb +23 -23
- data/examples/opengl3-affine.rb +29 -29
- data/examples/sample1.rb +11 -11
- data/examples/sample10.rb +16 -16
- data/examples/sample11.rb +22 -22
- data/examples/sample11a.rb +33 -33
- data/examples/sample12.rb +30 -30
- data/examples/sample12a.rb +35 -35
- data/examples/sample13.rb +116 -116
- data/examples/sample15.rb +24 -24
- data/examples/sample16.rb +31 -31
- data/examples/sample16a.rb +35 -35
- data/examples/sample6.rb +18 -18
- data/examples/sample7.rb +16 -16
- data/examples/sample9.rb +20 -20
- data/examples/testgl.rb +169 -169
- data/lib/sgl/bass.rb +46 -46
- data/lib/sgl/cocoa-app.rb +43 -43
- data/lib/sgl/cocoa-color.rb +65 -65
- data/lib/sgl/cocoa-draw.rb +72 -72
- data/lib/sgl/cocoa-event.rb +229 -229
- data/lib/sgl/cocoa-media.rb +144 -144
- data/lib/sgl/cocoa-notuse.rb +493 -493
- data/lib/sgl/cocoa-window.rb +203 -203
- data/lib/sgl/cocoa.rb +8 -8
- data/lib/sgl/opengl-app.rb +38 -38
- data/lib/sgl/opengl-color.rb +44 -44
- data/lib/sgl/opengl-draw.rb +260 -260
- data/lib/sgl/opengl-event.rb +325 -325
- data/lib/sgl/opengl-modules.rb +22 -22
- data/lib/sgl/opengl-window.rb +224 -224
- data/lib/sgl/opengl.rb +7 -7
- data/lib/sgl/sgl-button.rb +135 -135
- data/lib/sgl/sgl-client.rb +21 -21
- data/lib/sgl/sgl-color.rb +68 -82
- data/lib/sgl/sgl-connect.rb +9 -9
- data/lib/sgl/sgl-server.rb +58 -58
- data/lib/sgl/sgl-spring.rb +216 -216
- data/lib/sgl/version.rb +2 -2
- data/scripts/lib-txt2html.rb +130 -0
- data/scripts/txt2html +2 -63
- data/spec/sgl_spec.rb +13 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +1 -0
- data/test/test_cocoa_app.rb +291 -291
- data/test/test_module_ruby16.rb +30 -30
- data/test/test_opengl_app.rb +147 -147
- data/test/test_opengl_basic.rb +22 -22
- data/test/test_opengl_fullscreen.rb +23 -23
- data/test/test_opengl_novice.rb +35 -35
- data/website/challenge1.html +91 -91
- data/website/challenge1.txt +3 -3
- data/website/challenge2.html +143 -144
- data/website/challenge2.txt +13 -14
- data/website/challenge3.html +66 -63
- data/website/challenge3.txt +7 -7
- data/website/cocoa.html +85 -88
- data/website/cocoa.txt +2 -4
- data/website/description.html +138 -138
- data/website/description.txt +1 -1
- data/website/exercise1.html +262 -264
- data/website/exercise1.txt +58 -53
- data/website/exercise2.html +241 -683
- data/website/exercise2.txt +11 -427
- data/website/exercise3.html +206 -0
- data/website/exercise3.txt +155 -0
- data/website/exercise4.html +198 -0
- data/website/exercise4.txt +151 -0
- data/website/exercise5.html +162 -0
- data/website/exercise5.txt +113 -0
- data/website/exhibition.html +84 -84
- data/website/howto.html +146 -134
- data/website/howto.txt +9 -0
- data/website/index.html +178 -178
- data/website/index.txt +20 -19
- data/website/sound.html +141 -141
- metadata +16 -3
data/History.txt
CHANGED
data/Manifest.txt
CHANGED
@@ -69,9 +69,13 @@ lib/sgl/sgl-spring.rb
|
|
69
69
|
lib/sgl/sgl-timer.rb
|
70
70
|
lib/sgl/sgl.rb
|
71
71
|
lib/sgl/version.rb
|
72
|
+
scripts/lib-txt2html.rb
|
72
73
|
scripts/makemanifest.rb
|
73
74
|
scripts/txt2html
|
74
75
|
setup.rb
|
76
|
+
spec/sgl_spec.rb
|
77
|
+
spec/spec.opts
|
78
|
+
spec/spec_helper.rb
|
75
79
|
test/test_bass.rb
|
76
80
|
test/test_cocoa_app.rb
|
77
81
|
test/test_helper.rb
|
@@ -96,6 +100,12 @@ website/exercise1.html
|
|
96
100
|
website/exercise1.txt
|
97
101
|
website/exercise2.html
|
98
102
|
website/exercise2.txt
|
103
|
+
website/exercise3.html
|
104
|
+
website/exercise3.txt
|
105
|
+
website/exercise4.html
|
106
|
+
website/exercise4.txt
|
107
|
+
website/exercise5.html
|
108
|
+
website/exercise5.txt
|
99
109
|
website/exhibition.html
|
100
110
|
website/exhibition.txt
|
101
111
|
website/howto.html
|
data/Rakefile
CHANGED
@@ -8,12 +8,19 @@ require 'rake/rdoctask'
|
|
8
8
|
require 'rake/contrib/rubyforgepublisher'
|
9
9
|
require 'fileutils'
|
10
10
|
require 'hoe'
|
11
|
+
begin
|
12
|
+
require 'spec/rake/spectask'
|
13
|
+
rescue LoadError
|
14
|
+
puts 'To use rspec for testing you must install rspec gem:'
|
15
|
+
puts '$ sudo gem install rspec'
|
16
|
+
exit
|
17
|
+
end
|
11
18
|
|
12
19
|
include FileUtils
|
13
20
|
require File.join(File.dirname(__FILE__), 'lib', 'sgl', 'version')
|
14
21
|
|
15
22
|
AUTHOR = 'Kouichirou Eto'
|
16
|
-
EMAIL = "eto
|
23
|
+
EMAIL = "eto _at_ rubyforge _dot_ org"
|
17
24
|
DESCRIPTION = '"sgl: simple generic library" enables you to create a program with graphics and sound easily.'
|
18
25
|
GEM_NAME = 'sgl'
|
19
26
|
|
@@ -84,8 +91,11 @@ hoe.remote_rdoc_dir = File.join(PATH.gsub(/^#{RUBYFORGE_PROJECT}\/?/,''), 'rdoc'
|
|
84
91
|
|
85
92
|
desc 'Generate website files'
|
86
93
|
task :website_generate do
|
94
|
+
require 'scripts/lib-txt2html'
|
95
|
+
t2h = Txt2Html.new
|
87
96
|
Dir['website/**/*.txt'].each do |txt|
|
88
|
-
|
97
|
+
puts txt
|
98
|
+
t2h.translate(txt, txt.gsub(/txt$/, 'html'))
|
89
99
|
end
|
90
100
|
end
|
91
101
|
|
@@ -128,6 +138,13 @@ task :check_version do
|
|
128
138
|
end
|
129
139
|
end
|
130
140
|
|
141
|
+
desc "Run the specs under spec/models"
|
142
|
+
Spec::Rake::SpecTask.new do |t|
|
143
|
+
t.spec_opts = ['--options', "spec/spec.opts"]
|
144
|
+
t.spec_files = FileList['spec/*_spec.rb']
|
145
|
+
t.libs << "lib"
|
146
|
+
end
|
147
|
+
|
131
148
|
# add chmod.
|
132
149
|
task :docs do
|
133
150
|
sh %{ chmod -R go+rx doc }
|
@@ -161,11 +178,12 @@ desc 'Change mode to erase executable bits.'
|
|
161
178
|
task :chmod do
|
162
179
|
sh "chmod 644 Rakefile ChangeLog"
|
163
180
|
sh "chmod 644 *.txt */*.txt"
|
164
|
-
sh "chmod 644
|
165
|
-
sh "chmod 644
|
166
|
-
sh "chmod 644
|
167
|
-
sh "chmod 644
|
181
|
+
sh "chmod 644 */*.html"
|
182
|
+
sh "chmod 644 */*.rhtml"
|
183
|
+
sh "chmod 644 */*/*.js"
|
184
|
+
sh "chmod 644 */*/*.css"
|
168
185
|
sh "chmod 644 *.rb */*.rb */*/*.rb"
|
186
|
+
sh "chmod 644 */*.opts"
|
169
187
|
sh "chmod 755 scripts/*"
|
170
188
|
end
|
171
189
|
|
@@ -188,6 +206,8 @@ end
|
|
188
206
|
|
189
207
|
# Add tasks to gem
|
190
208
|
task :gem => [:manifest]
|
191
|
-
#task :gem => [:website_generate]
|
192
209
|
|
210
|
+
#desc "Default task is to run specs"
|
211
|
+
task :default => [:spec]
|
212
|
+
#task :default => :spec
|
193
213
|
#task :default => :test
|
data/examples/cocoa1-basic.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
window 100, 100
|
8
|
-
end
|
9
|
-
|
10
|
-
def display
|
11
|
-
line 0, 0, 100, 100
|
12
|
-
end
|
13
|
-
|
14
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
window 100, 100
|
8
|
+
end
|
9
|
+
|
10
|
+
def display
|
11
|
+
line 0, 0, 100, 100
|
12
|
+
end
|
13
|
+
|
14
|
+
mainloop
|
@@ -1,26 +1,26 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
$windowBorder = 0
|
8
|
-
$windowShadow = 0
|
9
|
-
window 700, 700
|
10
|
-
backgroundHSV 66, 100, 20, 100
|
11
|
-
end
|
12
|
-
|
13
|
-
def display
|
14
|
-
x, y = mouseX, mouseY
|
15
|
-
colorHSV 0, 50, 100
|
16
|
-
backgroundHSV 66, 100, 20, y/7
|
17
|
-
lineWidth 3
|
18
|
-
line 0, 0, x, y
|
19
|
-
line 700, 0, x, y
|
20
|
-
line 0, 700, x, y
|
21
|
-
line 700, 700, x, y
|
22
|
-
colorHSV 0, 100, 100
|
23
|
-
rect x-10, y-10, x+10, y+10
|
24
|
-
end
|
25
|
-
|
26
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
$windowBorder = 0
|
8
|
+
$windowShadow = 0
|
9
|
+
window 700, 700
|
10
|
+
backgroundHSV 66, 100, 20, 100
|
11
|
+
end
|
12
|
+
|
13
|
+
def display
|
14
|
+
x, y = mouseX, mouseY
|
15
|
+
colorHSV 0, 50, 100
|
16
|
+
backgroundHSV 66, 100, 20, y/7
|
17
|
+
lineWidth 3
|
18
|
+
line 0, 0, x, y
|
19
|
+
line 700, 0, x, y
|
20
|
+
line 0, 700, x, y
|
21
|
+
line 700, 700, x, y
|
22
|
+
colorHSV 0, 100, 100
|
23
|
+
rect x-10, y-10, x+10, y+10
|
24
|
+
end
|
25
|
+
|
26
|
+
mainloop
|
@@ -1,13 +1,13 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa-app"
|
5
|
-
|
6
|
-
app = SGL::Application.new
|
7
|
-
app.set_setup {
|
8
|
-
app.window(100, 100)
|
9
|
-
}
|
10
|
-
app.set_display {
|
11
|
-
app.line(0, 0, 100, 100)
|
12
|
-
}
|
13
|
-
app.mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa-app"
|
5
|
+
|
6
|
+
app = SGL::Application.new
|
7
|
+
app.set_setup {
|
8
|
+
app.window(100, 100)
|
9
|
+
}
|
10
|
+
app.set_display {
|
11
|
+
app.line(0, 0, 100, 100)
|
12
|
+
}
|
13
|
+
app.mainloop
|
data/examples/cocoa2-draw.rb
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
window 300, 300
|
8
|
-
backgroundHSV 66, 100, 20
|
9
|
-
end
|
10
|
-
|
11
|
-
def display
|
12
|
-
x, y = mouseX, mouseY
|
13
|
-
colorHSV 0, 50, 100
|
14
|
-
lineWidth 3
|
15
|
-
line 0, 0, x, y
|
16
|
-
line 300, 0, x, y
|
17
|
-
line 0, 300, x, y
|
18
|
-
line 300, 300, x, y
|
19
|
-
colorHSV 0, 100, 100
|
20
|
-
rect x-10, y-10, x+10, y+10
|
21
|
-
end
|
22
|
-
|
23
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
window 300, 300
|
8
|
+
backgroundHSV 66, 100, 20
|
9
|
+
end
|
10
|
+
|
11
|
+
def display
|
12
|
+
x, y = mouseX, mouseY
|
13
|
+
colorHSV 0, 50, 100
|
14
|
+
lineWidth 3
|
15
|
+
line 0, 0, x, y
|
16
|
+
line 300, 0, x, y
|
17
|
+
line 0, 300, x, y
|
18
|
+
line 300, 300, x, y
|
19
|
+
colorHSV 0, 100, 100
|
20
|
+
rect x-10, y-10, x+10, y+10
|
21
|
+
end
|
22
|
+
|
23
|
+
mainloop
|
data/examples/cocoa3-affine.rb
CHANGED
@@ -1,29 +1,29 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
window 700, 700
|
8
|
-
backgroundHSV 66, 100, 20
|
9
|
-
$font1 = font("Helvetica", 25)
|
10
|
-
end
|
11
|
-
|
12
|
-
def display
|
13
|
-
x, y = mouseX, mouseY
|
14
|
-
colorHSV 0, 50, 100
|
15
|
-
lineWidth 3
|
16
|
-
line 0, 0, x, y
|
17
|
-
line 700, 0, x, y
|
18
|
-
line 0, 700, x, y
|
19
|
-
line 700, 700, x, y
|
20
|
-
colorHSV 0, 100, 100
|
21
|
-
|
22
|
-
translate x, y
|
23
|
-
rotateZ y
|
24
|
-
colorHSV y, 100, 100
|
25
|
-
$font1.text(10, 10, "hello")
|
26
|
-
rect -10, -10, +10, +10
|
27
|
-
end
|
28
|
-
|
29
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
window 700, 700
|
8
|
+
backgroundHSV 66, 100, 20
|
9
|
+
$font1 = font("Helvetica", 25)
|
10
|
+
end
|
11
|
+
|
12
|
+
def display
|
13
|
+
x, y = mouseX, mouseY
|
14
|
+
colorHSV 0, 50, 100
|
15
|
+
lineWidth 3
|
16
|
+
line 0, 0, x, y
|
17
|
+
line 700, 0, x, y
|
18
|
+
line 0, 700, x, y
|
19
|
+
line 700, 700, x, y
|
20
|
+
colorHSV 0, 100, 100
|
21
|
+
|
22
|
+
translate x, y
|
23
|
+
rotateZ y
|
24
|
+
colorHSV y, 100, 100
|
25
|
+
$font1.text(10, 10, "hello")
|
26
|
+
rect -10, -10, +10, +10
|
27
|
+
end
|
28
|
+
|
29
|
+
mainloop
|
data/examples/cocoa4-font.rb
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
window 700, 700
|
8
|
-
backgroundHSV 66, 100, 20
|
9
|
-
$font1 = font("Helvetica")
|
10
|
-
$font2 = font("GothicMB101Pro-Ultra")
|
11
|
-
# $font.show_all
|
12
|
-
# $font.show_fixed
|
13
|
-
end
|
14
|
-
|
15
|
-
def display
|
16
|
-
x, y = mouseX, mouseY
|
17
|
-
colorHSV 0, 50, 100, y/3
|
18
|
-
$font1.size = x
|
19
|
-
$font1.text(x, y, "hello")
|
20
|
-
$font2.size = y
|
21
|
-
$font2.text(x-50, y-50, "����")
|
22
|
-
end
|
23
|
-
|
24
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
window 700, 700
|
8
|
+
backgroundHSV 66, 100, 20
|
9
|
+
$font1 = font("Helvetica")
|
10
|
+
$font2 = font("GothicMB101Pro-Ultra")
|
11
|
+
# $font.show_all
|
12
|
+
# $font.show_fixed
|
13
|
+
end
|
14
|
+
|
15
|
+
def display
|
16
|
+
x, y = mouseX, mouseY
|
17
|
+
colorHSV 0, 50, 100, y/3
|
18
|
+
$font1.size = x
|
19
|
+
$font1.text(x, y, "hello")
|
20
|
+
$font2.size = y
|
21
|
+
$font2.text(x-50, y-50, "����")
|
22
|
+
end
|
23
|
+
|
24
|
+
mainloop
|
data/examples/cocoa5-image.rb
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
$windowShadow = 0
|
8
|
-
window 700, 700
|
9
|
-
backgroundHSV 66, 100, 20
|
10
|
-
$image = image("../media/image-heart.psd")
|
11
|
-
end
|
12
|
-
|
13
|
-
def display
|
14
|
-
x, y = mouseX, mouseY
|
15
|
-
colorHSV 0, 50, 100, y/5
|
16
|
-
backgroundHSV 66, 100, 20, 300-x/2
|
17
|
-
$image.rect(100, 100, 200, 200)
|
18
|
-
$image.rect(0, 0, x, y)
|
19
|
-
$image.rect(x, y, x+100, y+100)
|
20
|
-
end
|
21
|
-
|
22
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
$windowShadow = 0
|
8
|
+
window 700, 700
|
9
|
+
backgroundHSV 66, 100, 20
|
10
|
+
$image = image("../media/image-heart.psd")
|
11
|
+
end
|
12
|
+
|
13
|
+
def display
|
14
|
+
x, y = mouseX, mouseY
|
15
|
+
colorHSV 0, 50, 100, y/5
|
16
|
+
backgroundHSV 66, 100, 20, 300-x/2
|
17
|
+
$image.rect(100, 100, 200, 200)
|
18
|
+
$image.rect(0, 0, x, y)
|
19
|
+
$image.rect(x, y, x+100, y+100)
|
20
|
+
end
|
21
|
+
|
22
|
+
mainloop
|
data/examples/cocoa6-sound.rb
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
-
|
4
|
-
require "sgl/cocoa"
|
5
|
-
|
6
|
-
def setup
|
7
|
-
window 700, 700
|
8
|
-
backgroundHSV 66, 100, 20
|
9
|
-
$sound = sound("../media/Pop.aiff")
|
10
|
-
end
|
11
|
-
|
12
|
-
def onMouseDown(x, y)
|
13
|
-
if 100 < x && x < 120 && 100 < y && y < 120
|
14
|
-
$sound.play
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
def display
|
19
|
-
x, y = mouseX, mouseY
|
20
|
-
color 100, 0, 0
|
21
|
-
rect 100, 100, 120, 120
|
22
|
-
end
|
23
|
-
|
24
|
-
mainloop
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved.
|
3
|
+
|
4
|
+
require "sgl/cocoa"
|
5
|
+
|
6
|
+
def setup
|
7
|
+
window 700, 700
|
8
|
+
backgroundHSV 66, 100, 20
|
9
|
+
$sound = sound("../media/Pop.aiff")
|
10
|
+
end
|
11
|
+
|
12
|
+
def onMouseDown(x, y)
|
13
|
+
if 100 < x && x < 120 && 100 < y && y < 120
|
14
|
+
$sound.play
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
def display
|
19
|
+
x, y = mouseX, mouseY
|
20
|
+
color 100, 0, 0
|
21
|
+
rect 100, 100, 120, 120
|
22
|
+
end
|
23
|
+
|
24
|
+
mainloop
|