Shoes

Shoooes! > Tutorials

_why’s tutorial walkthrough

Right here.

Clock

1 Shoes.app do
2   @time = title "0:00"
3   every 1 do
4     @time.replace(Time.now.strftime("%I:%M %p")) # 12-hour time
5     #@time.replace(Time.now.strftime("%H:%M")) # 24-hour time
6   end
7 end

Scribble

1 Shoes.app do
2   ox, oy = nil, nil
3   animate 24 do
4     b, x, y = self.mouse
5     line(ox, oy, x, y)  if b == 1
6     ox, oy = x, y
7   end
8 end