shoes 4.0.0.pre11 → 4.0.0.pre12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/bin/shoes-stub +8 -0
  3. data/lib/shoes/samples.rb +8 -0
  4. data/samples/README +122 -0
  5. data/samples/avatar.png +0 -0
  6. data/samples/blue-box.png +0 -0
  7. data/samples/class-book.yaml +387 -0
  8. data/samples/class_book.rb +46 -0
  9. data/samples/cy.png +0 -0
  10. data/samples/expert_definr.rb +24 -0
  11. data/samples/expert_funnies.rb +60 -0
  12. data/samples/expert_game_of_life.rb +224 -0
  13. data/samples/expert_irb.rb +109 -0
  14. data/samples/expert_minesweeper.rb +272 -0
  15. data/samples/expert_othello.rb +323 -0
  16. data/samples/expert_pong.rb +69 -0
  17. data/samples/expert_snake.rb +88 -0
  18. data/samples/expert_tankspank.rb +425 -0
  19. data/samples/expert_tetris.rb +322 -0
  20. data/samples/good_arc.rb +51 -0
  21. data/samples/good_bounce.rb +34 -0
  22. data/samples/good_clock.rb +55 -0
  23. data/samples/good_displace.rb +99 -0
  24. data/samples/good_follow.rb +27 -0
  25. data/samples/good_image_dl.rb +13 -0
  26. data/samples/good_potato_chopping.rb +23 -0
  27. data/samples/good_psychidelic_circles.rb +73 -0
  28. data/samples/good_reminder.rb +163 -0
  29. data/samples/good_vjot.rb +65 -0
  30. data/samples/lib/require_me.rb +6 -0
  31. data/samples/loogink.png +0 -0
  32. data/samples/menu-corner1.png +0 -0
  33. data/samples/menu-corner2.png +0 -0
  34. data/samples/menu-gray.png +0 -0
  35. data/samples/menu-left.png +0 -0
  36. data/samples/menu-right.png +0 -0
  37. data/samples/menu-top.png +0 -0
  38. data/samples/nks_booklist.rb +25 -0
  39. data/samples/nks_breadsticks.rb +8 -0
  40. data/samples/nks_dancing_circle.rb +14 -0
  41. data/samples/nks_dictionary.rb +24 -0
  42. data/samples/nks_edit_box.rb +5 -0
  43. data/samples/nks_edit_line.rb +7 -0
  44. data/samples/nks_notes.rb +16 -0
  45. data/samples/nks_poem.rb +23 -0
  46. data/samples/nks_self.rb +7 -0
  47. data/samples/nks_text_sizes.rb +11 -0
  48. data/samples/nks_trurl.rb +6 -0
  49. data/samples/potato_chopping/1258_s001.gif +0 -0
  50. data/samples/potato_chopping/1258_s002.gif +0 -0
  51. data/samples/potato_chopping/1258_s003.gif +0 -0
  52. data/samples/potato_chopping/1258_s004.gif +0 -0
  53. data/samples/potato_chopping/1258_s005.gif +0 -0
  54. data/samples/potato_chopping/1258_s006.gif +0 -0
  55. data/samples/potato_chopping/1258_s007.gif +0 -0
  56. data/samples/potato_chopping/1258_s008.gif +0 -0
  57. data/samples/potato_chopping/1258_s009.gif +0 -0
  58. data/samples/potato_chopping/1258_s010.gif +0 -0
  59. data/samples/potato_chopping/1258_s011.gif +0 -0
  60. data/samples/potato_chopping/1258_s012.gif +0 -0
  61. data/samples/potato_chopping/1258_s013.gif +0 -0
  62. data/samples/potato_chopping/1258_s014.gif +0 -0
  63. data/samples/potato_chopping/1258_s015.gif +0 -0
  64. data/samples/potato_chopping/1258_s016.gif +0 -0
  65. data/samples/potato_chopping/1258_s017.gif +0 -0
  66. data/samples/potato_chopping/1258_s018.gif +0 -0
  67. data/samples/potato_chopping/1258_s019.gif +0 -0
  68. data/samples/potato_chopping/1258_s020.gif +0 -0
  69. data/samples/potato_chopping/1258_s021.gif +0 -0
  70. data/samples/potato_chopping/1258_s022.gif +0 -0
  71. data/samples/potato_chopping/1258_s023.gif +0 -0
  72. data/samples/potato_chopping/1258_s024.gif +0 -0
  73. data/samples/potato_chopping/1258_s025.gif +0 -0
  74. data/samples/potato_chopping/1258_s026.gif +0 -0
  75. data/samples/potato_chopping/1258_s027.gif +0 -0
  76. data/samples/potato_chopping/1258_s028.gif +0 -0
  77. data/samples/potato_chopping/1258_s029.gif +0 -0
  78. data/samples/potato_chopping/1258_s030.gif +0 -0
  79. data/samples/potato_chopping/1258_s031.gif +0 -0
  80. data/samples/potato_chopping/1258_s032.gif +0 -0
  81. data/samples/potato_chopping/1258_s033.gif +0 -0
  82. data/samples/potato_chopping/1258_s034.gif +0 -0
  83. data/samples/potato_chopping/1258_s035.gif +0 -0
  84. data/samples/potato_chopping/1258_s036.gif +0 -0
  85. data/samples/potato_chopping/1258_s037.gif +0 -0
  86. data/samples/potato_chopping/1258_s038.gif +0 -0
  87. data/samples/potato_chopping/1258_s039.gif +0 -0
  88. data/samples/potato_chopping/1258_s040.gif +0 -0
  89. data/samples/potato_chopping/1258_s041.gif +0 -0
  90. data/samples/potato_chopping/1258_s042.gif +0 -0
  91. data/samples/potato_chopping/1258_s043.gif +0 -0
  92. data/samples/potato_chopping/1258_s044.gif +0 -0
  93. data/samples/potato_chopping/1258_s045.gif +0 -0
  94. data/samples/potato_chopping/1258_s046.gif +0 -0
  95. data/samples/potato_chopping/1258_s047.gif +0 -0
  96. data/samples/potato_chopping/1258_s048.gif +0 -0
  97. data/samples/potato_chopping/1258_s049.gif +0 -0
  98. data/samples/potato_chopping/1258_s050.gif +0 -0
  99. data/samples/potato_chopping/1258_s051.gif +0 -0
  100. data/samples/potato_chopping/1258_s052.gif +0 -0
  101. data/samples/potato_chopping/1258_s053.gif +0 -0
  102. data/samples/potato_chopping/1258_s054.gif +0 -0
  103. data/samples/potato_chopping/1258_s055.gif +0 -0
  104. data/samples/potato_chopping/1258_s056.gif +0 -0
  105. data/samples/potato_chopping/1258_s057.gif +0 -0
  106. data/samples/potato_chopping/1258_s058.gif +0 -0
  107. data/samples/potato_chopping/1258_s059.gif +0 -0
  108. data/samples/red-box.png +0 -0
  109. data/samples/shape_arc_to.rb +10 -0
  110. data/samples/simple-form.shy +0 -0
  111. data/samples/simple_accordion.rb +98 -0
  112. data/samples/simple_alert.rb +10 -0
  113. data/samples/simple_altered_para.rb +11 -0
  114. data/samples/simple_anim_shapes.rb +18 -0
  115. data/samples/simple_anim_text.rb +14 -0
  116. data/samples/simple_animate.rb +12 -0
  117. data/samples/simple_arc.rb +25 -0
  118. data/samples/simple_attach.rb +26 -0
  119. data/samples/simple_border_image.rb +9 -0
  120. data/samples/simple_borderless.rb +4 -0
  121. data/samples/simple_bounce.rb +27 -0
  122. data/samples/simple_breadsticks.rb +11 -0
  123. data/samples/simple_breadsticks2.rb +11 -0
  124. data/samples/simple_brightness_transitions.rb +16 -0
  125. data/samples/simple_button_animate.rb +17 -0
  126. data/samples/simple_buttons.rb +4 -0
  127. data/samples/simple_calc.rb +67 -0
  128. data/samples/simple_calc_2.rb +49 -0
  129. data/samples/simple_clipboard.rb +17 -0
  130. data/samples/simple_color_selector.rb +11 -0
  131. data/samples/simple_color_transitions.rb +12 -0
  132. data/samples/simple_concentric_circles.rb +9 -0
  133. data/samples/simple_console.rb +12 -0
  134. data/samples/simple_control_sizes.rb +25 -0
  135. data/samples/simple_count_and_draw.rb +19 -0
  136. data/samples/simple_curve.rb +34 -0
  137. data/samples/simple_dialogs.rb +33 -0
  138. data/samples/simple_dialogs_outside.rb +17 -0
  139. data/samples/simple_displace.rb +16 -0
  140. data/samples/simple_downloader.rb +29 -0
  141. data/samples/simple_draw.rb +16 -0
  142. data/samples/simple_editor.rb +30 -0
  143. data/samples/simple_face.rb +15 -0
  144. data/samples/simple_flashing.rb +22 -0
  145. data/samples/simple_flow_wrap.rb +12 -0
  146. data/samples/simple_font.rb +18 -0
  147. data/samples/simple_form.rb +30 -0
  148. data/samples/simple_fullscreen.rb +5 -0
  149. data/samples/simple_gradient_shapes.rb +23 -0
  150. data/samples/simple_guess_game.rb +30 -0
  151. data/samples/simple_image_as_stroke.rb +22 -0
  152. data/samples/simple_image_fill.rb +13 -0
  153. data/samples/simple_image_stroke.rb +13 -0
  154. data/samples/simple_info.rb +10 -0
  155. data/samples/simple_iterated_content.rb +8 -0
  156. data/samples/simple_keypress.rb +15 -0
  157. data/samples/simple_logo_display.rb +15 -0
  158. data/samples/simple_loogink_cy.rb +33 -0
  159. data/samples/simple_lorem_ipsum.rb +19 -0
  160. data/samples/simple_manual.rb +5 -0
  161. data/samples/simple_menu.rb +42 -0
  162. data/samples/simple_mouse_follow.rb +9 -0
  163. data/samples/simple_oval.rb +6 -0
  164. data/samples/simple_polygon_line.rb +19 -0
  165. data/samples/simple_position_as_we_go.rb +10 -0
  166. data/samples/simple_progress_bar.rb +15 -0
  167. data/samples/simple_random_bubbles.rb +15 -0
  168. data/samples/simple_require.rb +9 -0
  169. data/samples/simple_sample_executor.rb +7 -0
  170. data/samples/simple_sample_executor_all.rb +14 -0
  171. data/samples/simple_sesame_street_shoes.rb +6 -0
  172. data/samples/simple_shoes_intro.rb +22 -0
  173. data/samples/simple_slide.rb +57 -0
  174. data/samples/simple_stack_flow_buttons.rb +16 -0
  175. data/samples/simple_stripes.rb +9 -0
  176. data/samples/simple_system_background.rb +5 -0
  177. data/samples/simple_text_movement.rb +8 -0
  178. data/samples/simple_tictactoe.rb +224 -0
  179. data/samples/simple_timer.rb +16 -0
  180. data/samples/simple_translate.rb +10 -0
  181. data/samples/simple_visibility.rb +20 -0
  182. metadata +186 -7
@@ -0,0 +1,18 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ background rgb(0, 0, 0)
4
+ fill rgb(255, 255, 255)
5
+ rects = [
6
+ rect(0, 0, 50, 50),
7
+ rect(0, 0, 100, 100),
8
+ rect(0, 0, 75, 75)
9
+ ]
10
+ animate(24) do
11
+ rects.each do |r|
12
+ r.move(rand(0..400), rand(0..400))
13
+ end
14
+ end
15
+ button "OK", top: 0.5, left: 0.5 do
16
+ quit unless confirm "You ARE sure you're OK??"
17
+ end
18
+ end
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ stack top: 0.5, left: 0.5 do
4
+ para "Counting up:"
5
+ l = para "0"
6
+ animate(24) do |i|
7
+ f = ['Arial 14px', 'Serif 34px', 'Monospace 18px', 'Arial 48px'][rand(3)]
8
+ l.replace i.to_s, font: f
9
+ end
10
+ motion do |x, y|
11
+ Shoes.p [x, y]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ fill goldenrod
4
+ stroke tomato
5
+ strokewidth 6
6
+ oval 200, 100, 360, 360
7
+ animate 24 do |frame|
8
+ left = 200 + Math.sin(frame) * 80
9
+ top = 100 + Math.cos(frame) * 80
10
+ oval left, top, 360, 360
11
+ end
12
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # a translation from a processing example
4
+ # http://vormplus.be/weging/an-introduction-to-processing/
5
+ #
6
+ Shoes.app width: 420, height: 420, resizable: false do
7
+ rotation = -(Shoes::HALF_PI / 3)
8
+ step = 20
9
+
10
+ background gray(240)
11
+ stroke gray(127)
12
+ cap :curve
13
+ nofill
14
+
15
+ 10.times do |i|
16
+ strokewidth i
17
+ size = 200 + (step * i)
18
+ shape do
19
+ arc width / 2, height / 2,
20
+ size, size,
21
+ rotation * i, rotation * i + Shoes::TWO_PI - Shoes::HALF_PI,
22
+ center: true
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ stack do
4
+ background blue
5
+ 3.times do
6
+ para "Three lines first!"
7
+ end
8
+ end
9
+
10
+ stack attach: Shoes::Window, height: 30, width: 300 do
11
+ background green
12
+ para "Attached to the window!"
13
+ end
14
+
15
+ @next = stack margin: 20 do
16
+ background yellow
17
+ 3.times do
18
+ para "Three lines next!"
19
+ end
20
+ end
21
+
22
+ stack attach: @next, height: 30, width: 300 do
23
+ background red
24
+ para "Sneaked up!"
25
+ end
26
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app width: 300, height: 300 do
3
+ fname = File.join(Shoes::DIR, 'static/shoes-icon.png')
4
+ background yellow..orange, angle: 90
5
+ border fname, strokewidth: 20, curve: 100
6
+ fill fname
7
+ nostroke
8
+ oval 100, 100, 100, 100
9
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app border: false do
3
+ title "Look, no borders!"
4
+ end
@@ -0,0 +1,27 @@
1
+ # frozen_string_literal: true
2
+ xspeed = 8.4
3
+ yspeed = 6.6
4
+ xdir = 1
5
+ ydir = 1
6
+
7
+ Shoes.app do
8
+ background "#DFA"
9
+ border black, strokewidth: 6
10
+
11
+ nostroke
12
+ @icon = image "#{Shoes::DIR}/static/shoes-icon.png",
13
+ left: 100, top: 100, click: ->() { alert "You're soooo quick." }
14
+
15
+ x = width / 2
16
+ y = height / 2
17
+ size = [@icon.height, @icon.width]
18
+ animate(30) do
19
+ x += xspeed * xdir
20
+ y += yspeed * ydir
21
+
22
+ xdir *= -1 if x > width - size[0] || x.negative?
23
+ ydir *= -1 if y > height - size[1] || y.negative?
24
+
25
+ @icon.move x.to_i, y.to_i
26
+ end
27
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+ # Same snippet as http://shoes-tutorial-note.heroku.com/html/00402_No.1_para.html
3
+
4
+ Shoes.app width: 240, height: 95 do
5
+ para 'Testing, test, test. ',
6
+ strong('Breadsticks. '),
7
+ em('Breadsticks. '),
8
+ code('Breadsticks. '),
9
+ strong(ins('EVEN BETTER.')),
10
+ sub('fine!')
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+ # Add new method bg and fg to sample17
3
+
4
+ Shoes.app width: 240, height: 95 do
5
+ para 'Testing, test, test. ',
6
+ strong('Breadsticks. '),
7
+ em('Breadsticks. '),
8
+ code('Breadsticks. '),
9
+ bg(fg(strong(ins('EVEN BETTER.')), white), rgb(255, 0, 192)),
10
+ sub('fine!')
11
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app width: 300, height: 300 do
3
+ 10.times do |i|
4
+ # light to dark
5
+ flow(width: 0.5, height: 30) do
6
+ background forestgreen(0.1 * (i + 1))
7
+ para 'hello'
8
+ end
9
+
10
+ # dark to light
11
+ flow(width: 0.5, height: 30) do
12
+ background orangered(1.0 - 0.1 * i)
13
+ para 'shoes'
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ flow margin: 12 do
4
+ # Set up three buttons
5
+ button "Stop" do
6
+ @anim.stop
7
+ end
8
+ @two = button "Watch Me!"
9
+ button "Start" do
10
+ @anim.start
11
+ end
12
+ # Bounce the second button
13
+ @anim = animate do |frame|
14
+ @two.displace(0, (Math.sin(frame) * 30).to_i)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ 20.times { |i| button(format("hello%02d", i)) { |s| alert s.text } }
4
+ end
@@ -0,0 +1,67 @@
1
+ # frozen_string_literal: true
2
+ class Calc
3
+ def initialize
4
+ @number = 0
5
+ @previous = nil
6
+ @op = nil
7
+ end
8
+
9
+ def to_s
10
+ @number.to_s
11
+ end
12
+
13
+ (0..9).each do |n|
14
+ define_method "press_#{n}" do
15
+ @number = @number.to_i * 10 + n
16
+ end
17
+ end
18
+
19
+ def press_clear
20
+ @number = 0
21
+ end
22
+
23
+ {add: '+', sub: '-', times: '*', div: '/'}.each do |meth, op|
24
+ define_method "press_#{meth}" do
25
+ press_equals if @op
26
+ @op = op
27
+ @previous = @number
28
+ @number = nil
29
+ end
30
+ end
31
+
32
+ def press_equals
33
+ @number = @previous.send(@op, @number.to_i) unless @previous.nil? || @op.nil? || @number.nil?
34
+ @op = nil
35
+ end
36
+ end
37
+
38
+ number_field = nil
39
+ number = Calc.new
40
+ Shoes.app height: 250, width: 200, resizable: false do
41
+ background "#EEC".."#996", curve: 5, margin: 2
42
+
43
+ stack margin: 2 do
44
+ stack margin: 8 do
45
+ number_field = para strong(number)
46
+ end
47
+
48
+ flow width: 218, margin: 4 do
49
+ %w(7 8 9 / 4 5 6 * 1 2 3 - 0 Clr = +).each do |btn|
50
+ button btn, width: 46, height: 46 do
51
+ method = case btn
52
+ when /[0-9]/ then 'press_' + btn
53
+ when 'Clr' then 'press_clear'
54
+ when '=' then 'press_equals'
55
+ when '+' then 'press_add'
56
+ when '-' then 'press_sub'
57
+ when '*' then 'press_times'
58
+ when '/' then 'press_div'
59
+ end
60
+
61
+ number.send(method)
62
+ number_field.replace strong(number)
63
+ end
64
+ end
65
+ end
66
+ end
67
+ end
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app height: 250, width: 198 do
3
+ def clear
4
+ @accumulator = 0
5
+ @display = 0
6
+ @op = nil
7
+ end
8
+
9
+ def do_calc
10
+ @display = @accumulator.send(@op, @display) if @op
11
+
12
+ @op = nil
13
+ end
14
+
15
+ clear
16
+ @clear_display = false
17
+ background rgb(235, 235, 210)
18
+ flow margin: 5 do
19
+ flow height: 240, width: 190, margin: [2, 5, 0, 0] do
20
+ background '#996'..'#333', curve: 5
21
+ number_field = para strong(@display, ' ' * 20), stroke: white, margin: 8
22
+ flow width: 218 do
23
+ %w(7 8 9 / 4 5 6 * 1 2 3 - 0 Clr = +).each do |btn|
24
+ button btn, width: 46, height: 46 do
25
+ case btn
26
+ when /[0-9]/
27
+ if @clear_display
28
+ @display = 0
29
+ @clear_display = false
30
+ end
31
+ @display = @display.to_i * 10 + btn.to_i
32
+ when 'Clr'
33
+ clear
34
+ when '='
35
+ do_calc
36
+ @clear_display = true
37
+ when '/', '*', '-', '+'
38
+ do_calc
39
+ @accumulator = @display
40
+ @op = btn
41
+ @clear_display = true
42
+ end
43
+ number_field.text = @display.to_s
44
+ end
45
+ end
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ stack do
4
+ @line = edit_line "Put text here"
5
+ flow do
6
+ button "Copy" do
7
+ self.clipboard = @line.text
8
+ @buffer.text = "Now click Paste"
9
+ end
10
+ button "Paste" do
11
+ @buffer.text = clipboard
12
+ end
13
+ end
14
+
15
+ @buffer = para ""
16
+ end
17
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ lb = list_box items: Shoes::COLORS.keys.map(&:to_s), choose: 'red' do |s|
4
+ @o.style fill: send(s.text)
5
+ @p.text = s.text
6
+ end.move(300, 0)
7
+ @p = para
8
+ nostroke
9
+ @o = oval 100, 100, 100, 100
10
+ button('print') { para lb.text }.move(500, 0)
11
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ background chocolate..black, angle: 130
4
+ strokewidth 20
5
+ border deeppink..forestgreen, curve: 30
6
+ nostroke
7
+ fill crimson..cyan
8
+ oval 100, 100, 100, 100, angle: 45
9
+ nofill
10
+ strokewidth 50
11
+ rect 200, 200, 300, 200, stroke: darkblue..ivory, angle: 90
12
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app width: 330, height: 300 do
3
+ nofill
4
+ rect 100, 20, 130, 251, stroke: red, fill: yellow
5
+ 18.times do |i|
6
+ rotate 10 * i
7
+ rect 100, 20, 130, 251
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ para "Hit Alt + / to open the shoes console and see different message!"
4
+
5
+ flow do
6
+ %w(info debug warn error).each do |type|
7
+ button type.to_s do
8
+ public_send type, "This is a #{type} message"
9
+ end
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app width: 360, height: 600, resizable: false do
3
+ stroke "#dde"
4
+ background "#f1f5ff"
5
+ 13.times { |x| line 20, 142 + (30 * x), 320, 142 + (30 * x) }
6
+ 11.times { |x| line 20 + (30 * x), 142, 20 + (30 * x), 502 }
7
+
8
+ stack margin: 20 do
9
+ title "Control Sizes", size: 16
10
+ para "This app measures various controls against a grid of lines, to be sure they size appropriately despite the platform."
11
+ stack top: 122, left: 40 do
12
+ button "Standard"
13
+ button "Margin: 2, Height: 28", margin: 2, height: 30
14
+ edit_line "Standard", margin: 1
15
+ edit_line "Margin: 4, Height: 30", height: 30, margin: 4
16
+ list_box items: ["Standard"], choose: "Standard"
17
+ list_box items: ["Margin: 4, Height: 32"],
18
+ choose: "Margin: 4, Height: 32",
19
+ height: 32, margin: 4
20
+ progress
21
+ progress height: 32, margin: 4
22
+ edit_box
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,19 @@
1
+ # frozen_string_literal: true
2
+ Shoes.app do
3
+ button 'go' do
4
+ p = para 0, left: 0, top: 30
5
+ a = every do |i|
6
+ i += 1
7
+ j = i * 20
8
+ p.text = i.to_s
9
+ para i.to_s, left: j * 2, top: 30
10
+ oval 100 + j, 100 + j, 10, 10
11
+ a.remove if i > 8
12
+ end
13
+
14
+ timer 10 do
15
+ p.text = 'hello'
16
+ para 'shoes 4', left: 0, top: 200
17
+ end
18
+ end
19
+ end