|
Revision 120, 360 bytes
(checked in by why, 13 months ago)
|
|
* shoes/ruby.c: okay, using the Color class for everywhere colors are put to use.
* samples/: switched most of the examples to using the rgb and gray methods, though the old techniques are still good.
|
| Line | |
|---|
| 1 | Shoes.app do |
|---|
| 2 | background rgb(0, 0, 0) |
|---|
| 3 | fill rgb(255, 255, 255) |
|---|
| 4 | rects = [ |
|---|
| 5 | rect(0, 0, 50, 50), |
|---|
| 6 | rect(0, 0, 100, 100), |
|---|
| 7 | rect(0, 0, 75, 75) |
|---|
| 8 | ] |
|---|
| 9 | animate(24) do |i| |
|---|
| 10 | rects.each do |r| |
|---|
| 11 | r.move((0..400).rand, (0..400).rand) |
|---|
| 12 | end |
|---|
| 13 | end |
|---|
| 14 | button "OK", :top => 0.5, :left => 0.5 do |
|---|
| 15 | quit unless confirm "You ARE sure you're OK??" |
|---|
| 16 | end |
|---|
| 17 | end |
|---|