Sha256: 01d14ed715a4495991db2704dc8497ef4d8805993ebac56ecf3182569401ef44
Contents?: true
Size: 417 Bytes
Versions: 1
Compression:
Stored size: 417 Bytes
Contents
#!/usr/bin/env ruby # Copyright (C) 2004-2007 Kouichirou Eto, All rights reserved. require "sgl/cocoa" def setup window 700, 700 backgroundHSV 66, 100, 20 $sound = sound("../media/Pop.aiff") end def onMouseDown(x, y) if 100 < x && x < 120 && 100 < y && y < 120 $sound.play end end def display x, y = mouseX, mouseY color 100, 0, 0 rect 100, 100, 120, 120 end mainloop
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sgl-1.0.0 | examples/cocoa6-sound.rb |