limelight 0.1.0-java → 0.2.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (179) hide show
  1. data/bin/limelight +0 -0
  2. data/bin/ll +2 -2
  3. data/bin/ll.bat +2 -2
  4. data/lib/init.rb +5 -3
  5. data/lib/limelight.jar +0 -0
  6. data/lib/limelight/animation.rb +20 -0
  7. data/lib/limelight/build_exception.rb +1 -1
  8. data/lib/limelight/builtin/players.rb +12 -0
  9. data/lib/limelight/builtin/players/button.rb +24 -0
  10. data/lib/limelight/builtin/players/check_box.rb +31 -0
  11. data/lib/limelight/builtin/players/combo_box.rb +55 -0
  12. data/lib/limelight/builtin/players/combo_box_popup_list.rb +19 -0
  13. data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +21 -0
  14. data/lib/limelight/builtin/players/curtains.rb +22 -0
  15. data/lib/limelight/builtin/players/radio_button.rb +41 -0
  16. data/lib/limelight/builtin/players/text_area.rb +25 -0
  17. data/lib/limelight/builtin/players/text_box.rb +25 -0
  18. data/lib/limelight/builtin/styles.rb +35 -0
  19. data/lib/limelight/button_group_cache.rb +2 -2
  20. data/lib/limelight/casting_director.rb +9 -6
  21. data/lib/limelight/commands.rb +3 -3
  22. data/lib/limelight/file_chooser.rb +1 -1
  23. data/lib/limelight/file_filter.rb +1 -1
  24. data/lib/limelight/java_couplings.rb +57 -0
  25. data/lib/limelight/java_util.rb +1 -1
  26. data/lib/limelight/limelight_exception.rb +1 -1
  27. data/lib/limelight/loaders/file_scene_loader.rb +3 -2
  28. data/lib/limelight/menu_bar.rb +1 -1
  29. data/lib/limelight/paint_action.rb +2 -2
  30. data/lib/limelight/pen.rb +2 -2
  31. data/lib/limelight/producer.rb +21 -5
  32. data/lib/limelight/production.rb +1 -1
  33. data/lib/limelight/production_builder.rb +1 -1
  34. data/lib/limelight/prop.rb +49 -39
  35. data/lib/limelight/prop_builder.rb +1 -1
  36. data/lib/limelight/scene.rb +3 -3
  37. data/lib/limelight/stage.rb +5 -5
  38. data/lib/limelight/stage_builder.rb +1 -1
  39. data/lib/limelight/styles.rb +2 -2
  40. data/lib/limelight/styles_builder.rb +7 -7
  41. data/lib/limelight/theater.rb +2 -2
  42. data/lib/limelight/util.rb +1 -1
  43. data/lib/limelight/version.rb +2 -2
  44. data/productions/examples/8thlight.com/about/about.txt +3 -3
  45. data/productions/examples/8thlight.com/about/props.rb +1 -1
  46. data/productions/examples/8thlight.com/about/styles.rb +1 -1
  47. data/productions/examples/8thlight.com/footer.rb +1 -1
  48. data/productions/examples/8thlight.com/home/props.rb +1 -1
  49. data/productions/examples/8thlight.com/home/styles.rb +1 -1
  50. data/productions/examples/8thlight.com/images/bg.jpg +0 -0
  51. data/productions/examples/8thlight.com/images/button_bg.jpg +0 -0
  52. data/productions/examples/8thlight.com/images/canvas_bg.jpg +0 -0
  53. data/productions/examples/8thlight.com/images/thumbnail_book.jpg +0 -0
  54. data/productions/examples/8thlight.com/menu.rb +1 -1
  55. data/productions/examples/8thlight.com/services/props.rb +1 -1
  56. data/productions/examples/8thlight.com/services/services.txt +1 -1
  57. data/productions/examples/8thlight.com/services/styles.rb +1 -1
  58. data/productions/examples/8thlight.com/stages.rb +1 -1
  59. data/productions/examples/8thlight.com/styles.rb +8 -1
  60. data/productions/examples/calculator/players/button.rb +1 -1
  61. data/productions/examples/calculator/players/calculator.rb +1 -1
  62. data/productions/examples/calculator/players/calculator_model.rb +1 -1
  63. data/productions/examples/calculator/props.rb +1 -1
  64. data/productions/examples/calculator/styles.rb +1 -1
  65. data/productions/examples/langstons_ant/players/ant.rb +1 -1
  66. data/productions/examples/langstons_ant/players/log.rb +1 -1
  67. data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
  68. data/productions/examples/langstons_ant/players/world.rb +1 -1
  69. data/productions/examples/langstons_ant/props.rb +1 -1
  70. data/productions/examples/langstons_ant/styles.rb +1 -1
  71. data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
  72. data/productions/examples/sandbox/click_me/props.rb +1 -1
  73. data/productions/examples/sandbox/click_me/styles.rb +1 -1
  74. data/productions/examples/sandbox/floaters/players/floater.rb +21 -11
  75. data/productions/examples/sandbox/floaters/players/surface.rb +5 -1
  76. data/productions/examples/sandbox/floaters/props.rb +1 -1
  77. data/productions/examples/sandbox/floaters/styles.rb +1 -1
  78. data/productions/examples/sandbox/gradients/players/spinner.rb +5 -12
  79. data/productions/examples/sandbox/gradients/players/teaser.rb +7 -14
  80. data/productions/examples/sandbox/gradients/players/wave.rb +7 -14
  81. data/productions/examples/sandbox/gradients/players/waves.rb +7 -14
  82. data/productions/examples/sandbox/gradients/props.rb +1 -1
  83. data/productions/examples/sandbox/gradients/styles.rb +1 -1
  84. data/productions/examples/sandbox/header.rb +2 -1
  85. data/productions/examples/sandbox/homer/players/homer.rb +12 -8
  86. data/productions/examples/sandbox/homer/props.rb +1 -1
  87. data/productions/examples/sandbox/homer/styles.rb +1 -1
  88. data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
  89. data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
  90. data/productions/examples/sandbox/inputs/players/combo_box_input.rb +3 -3
  91. data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
  92. data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
  93. data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
  94. data/productions/examples/sandbox/inputs/props.rb +3 -3
  95. data/productions/examples/sandbox/inputs/styles.rb +2 -1
  96. data/productions/examples/sandbox/players/sandbox.rb +1 -1
  97. data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
  98. data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
  99. data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
  100. data/productions/examples/sandbox/scrolling/players/add_button.rb +19 -0
  101. data/productions/examples/sandbox/scrolling/players/cell.rb +1 -2
  102. data/productions/examples/sandbox/scrolling/props.rb +9 -4
  103. data/productions/examples/sandbox/scrolling/styles.rb +10 -1
  104. data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
  105. data/productions/examples/sandbox/sketching/props.rb +1 -1
  106. data/productions/examples/sandbox/sketching/styles.rb +1 -2
  107. data/productions/examples/sandbox/sounds/bird.au +0 -0
  108. data/productions/examples/sandbox/sounds/cat.au +0 -0
  109. data/productions/examples/sandbox/sounds/cow.au +0 -0
  110. data/productions/examples/sandbox/sounds/dog.au +0 -0
  111. data/productions/examples/sandbox/sounds/donkey.au +0 -0
  112. data/productions/examples/sandbox/sounds/duck.au +0 -0
  113. data/productions/examples/sandbox/sounds/players/clip.rb +10 -0
  114. data/productions/examples/sandbox/sounds/props.rb +10 -0
  115. data/productions/examples/sandbox/sounds/styles.rb +17 -0
  116. data/productions/examples/sandbox/stages.rb +2 -1
  117. data/productions/examples/sandbox/styles.rb +6 -6
  118. data/productions/examples/sandbox/teaser/players/fader.rb +22 -16
  119. data/productions/examples/sandbox/teaser/props.rb +1 -1
  120. data/productions/examples/sandbox/teaser/styles.rb +1 -1
  121. data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
  122. data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
  123. data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
  124. data/productions/stage_composer/init.rb +1 -1
  125. data/productions/stage_composer/inspector/players/inspector.rb +1 -1
  126. data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
  127. data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
  128. data/productions/stage_composer/inspector/players/style_table.rb +1 -1
  129. data/productions/stage_composer/inspector/players/style_value.rb +1 -1
  130. data/productions/stage_composer/inspector/props.rb +2 -2
  131. data/productions/stage_composer/inspector/styles.rb +3 -3
  132. data/productions/stage_composer/lib/init.rb +1 -1
  133. data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
  134. data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
  135. data/productions/stage_composer/production.rb +1 -1
  136. data/productions/stage_composer/stages.rb +1 -1
  137. data/productions/startup/players/browse_button.rb +3 -0
  138. data/productions/startup/players/download_button.rb +4 -1
  139. data/productions/startup/players/sandbox_button.rb +4 -1
  140. data/productions/startup/props.rb +3 -5
  141. data/productions/startup/styles.rb +5 -5
  142. data/spec/builtin/players/button_spec.rb +21 -0
  143. data/spec/builtin/players/check_box_spec.rb +29 -0
  144. data/spec/builtin/players/combo_box_spec.rb +29 -0
  145. data/spec/{players → builtin/players}/radio_button_spec.rb +9 -20
  146. data/spec/builtin/players/text_area_spec.rb +27 -0
  147. data/spec/builtin/players/text_box_spec.rb +27 -0
  148. data/spec/casting_director_spec.rb +3 -3
  149. data/spec/commands_spec.rb +2 -2
  150. data/spec/file_chooser_spec.rb +1 -1
  151. data/spec/file_filter_spec.rb +1 -1
  152. data/spec/java_util_spec.rb +1 -1
  153. data/spec/loaders/file_loader_spec.rb +1 -1
  154. data/spec/paint_action_spec.rb +1 -1
  155. data/spec/pen_spec.rb +1 -1
  156. data/spec/producer_spec.rb +14 -4
  157. data/spec/production_builder_spec.rb +1 -1
  158. data/spec/production_spec.rb +1 -1
  159. data/spec/prop_builder_spec.rb +1 -1
  160. data/spec/prop_spec.rb +66 -5
  161. data/spec/scene_spec.rb +2 -2
  162. data/spec/spec_helper.rb +4 -1
  163. data/spec/stage_builder_spec.rb +1 -1
  164. data/spec/stage_spec.rb +1 -1
  165. data/spec/styles_builder_spec.rb +34 -2
  166. data/spec/theater_spec.rb +1 -1
  167. metadata +130 -106
  168. data/lib/limelight/players.rb +0 -9
  169. data/lib/limelight/players/button.rb +0 -29
  170. data/lib/limelight/players/check_box.rb +0 -38
  171. data/lib/limelight/players/combo_box.rb +0 -44
  172. data/lib/limelight/players/radio_button.rb +0 -47
  173. data/lib/limelight/players/text_area.rb +0 -25
  174. data/lib/limelight/players/text_box.rb +0 -25
  175. data/spec/players/button_spec.rb +0 -31
  176. data/spec/players/check_box_spec.rb +0 -40
  177. data/spec/players/combo_box_spec.rb +0 -39
  178. data/spec/players/text_area_spec.rb +0 -37
  179. data/spec/players/text_box_spec.rb +0 -37
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  floater {
@@ -1,23 +1,16 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Spinner
5
5
 
6
6
  def mouse_entered(e)
7
- @active = true
8
- @thread = Thread.new { spin }
7
+ @animation = animate(:updates_per_second => 30) do
8
+ style.gradient_angle = (style.gradient_angle.to_i + 1).to_s
9
+ end
9
10
  end
10
11
 
11
12
  def mouse_exited(e)
12
- @active = false
13
- end
14
-
15
- def spin
16
- while @active
17
- style.gradient_angle = (style.gradient_angle.to_i + 1).to_s
18
- update_now
19
- sleep(0.02)
20
- end
13
+ @animation.stop
21
14
  end
22
15
 
23
16
  end
@@ -1,26 +1,19 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Teaser
5
-
5
+
6
6
  def mouse_entered(e)
7
- @active = true
8
7
  @step = -1
9
- @thread = Thread.new { wave }
10
- end
11
-
12
- def mouse_exited(e)
13
- @active = false
14
- end
15
-
16
- def wave
17
- while @active
8
+ @animation = animate(:updates_per_second => 30) do
18
9
  @step = -1 if style.gradient_penetration == "100"
19
10
  @step = 1 if style.gradient_penetration == "1"
20
11
  style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
21
- update_now
22
- sleep(0.02)
23
12
  end
24
13
  end
14
+
15
+ def mouse_exited(e)
16
+ @animation.stop
17
+ end
25
18
 
26
19
  end
@@ -1,26 +1,19 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Wave
5
-
5
+
6
6
  def mouse_entered(e)
7
- @active = true
8
7
  @step = -1
9
- @thread = Thread.new { wave }
10
- end
11
-
12
- def mouse_exited(e)
13
- @active = false
14
- end
15
-
16
- def wave
17
- while @active
8
+ @animation = animate(:updates_per_second => 30) do
18
9
  @step = -1 if style.gradient_penetration == "100"
19
10
  @step = 1 if style.gradient_penetration == "1"
20
11
  style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
21
- update_now
22
- sleep(0.02)
23
12
  end
24
13
  end
14
+
15
+ def mouse_exited(e)
16
+ @animation.stop
17
+ end
25
18
 
26
19
  end
@@ -1,26 +1,19 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Waves
5
-
5
+
6
6
  def mouse_entered(e)
7
- @active = true
8
7
  @step = -1
9
- @thread = Thread.new { wave }
10
- end
11
-
12
- def mouse_exited(e)
13
- @active = false
14
- end
15
-
16
- def wave
17
- while @active
8
+ @animation = animate(:updates_per_second => 30) do
18
9
  @step = -1 if style.gradient_penetration == "100"
19
10
  @step = 1 if style.gradient_penetration == "1"
20
11
  style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
21
- update_now
22
- sleep(0.02)
23
12
  end
24
13
  end
14
+
15
+ def mouse_exited(e)
16
+ @animation.stop
17
+ end
25
18
 
26
19
  end
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  sample {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  header do
@@ -11,5 +11,6 @@ header do
11
11
  example_link :text => "Rounded Corners", :on_mouse_clicked => "scene.load('rounded_corners')"
12
12
  example_link :text => "Floaters", :on_mouse_clicked => "scene.load('floaters')"
13
13
  example_link :text => "Sketching", :on_mouse_clicked => "scene.load('sketching')"
14
+ example_link :text => "Sound", :on_mouse_clicked => "scene.load('sounds')"
14
15
  end
15
16
 
@@ -1,19 +1,23 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Homer
5
5
 
6
6
  def mouse_entered(e)
7
- 100.times do |i|
8
- style.transparency = (100 - i).to_s
9
- update_now
10
- end
7
+ start_fading(100, -1)
11
8
  end
12
9
 
13
10
  def mouse_exited(e)
14
- 100.times do |i|
15
- style.transparency = i.to_s
16
- update_now
11
+ start_fading(0, 1)
12
+ end
13
+
14
+ def start_fading(start, direction)
15
+ return if !@animation.nil? && @animation.running?
16
+ @transparency = start
17
+ @animation = animate(:updates_per_second => 50) do
18
+ style.transparency = @transparency.to_s
19
+ @transparency += direction
20
+ @animation.stop if @transparency > 100 || @transparency < 0
17
21
  end
18
22
  end
19
23
 
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  beach {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  puts "REQUIRED"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module CheckBoxInput
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module ComboBoxInput
@@ -23,8 +23,8 @@ module ComboBoxInput
23
23
  print("lost focus")
24
24
  end
25
25
 
26
- def item_state_changed(e)
27
- print("Item State Changed")
26
+ def value_changed(e)
27
+ print("Value Changed")
28
28
  end
29
29
 
30
30
  def print(value)
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module RadioButtonInput
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module TextAreaInput
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module TextBoxInput
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -16,7 +16,7 @@ arena do
16
16
  cell { check_box_input :players => "check_box" }
17
17
  cell { input_log :id => "check_box_log" }
18
18
  cell(:border_width => "1") { input_results :id => "check_box_results" }
19
- # end row
19
+ # # end row
20
20
  cell do
21
21
  radio_button_input :players => "radio_button", :id => "radio_1", :group => "radios"
22
22
  radio_label :text => "One"
@@ -35,6 +35,6 @@ arena do
35
35
  cell { button_input :players => "button", :text => "A Button" }
36
36
  cell { input_log :id => "button_log" }
37
37
  cell(:border_width => "1") { input_results :id => "button_results" }
38
- # end row
38
+ # end row
39
39
  end
40
40
  end
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  table {
@@ -22,6 +22,7 @@ input_log {
22
22
  width "100%"
23
23
  background_color "#999"
24
24
  text_color "black"
25
+ # vertical_scroll_bar :on
25
26
  }
26
27
 
27
28
  input_results {
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  puts "SANDBOX EXTENSION"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Box
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  box {
@@ -0,0 +1,19 @@
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
+ #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
+
4
+
5
+
6
+ module AddButton
7
+
8
+ def button_pressed(e)
9
+
10
+ table = scene.find("#{id.split("_")[0]}_table")
11
+ table.children.each do |row|
12
+ if row.children.length < 10
13
+ row.add(Limelight::Prop.new( :name => "cell", :text => "CELL", :background_color => "orange", :secondary_background_color => "gray", :gradient_angle => "45", :gradient => "on"))
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ end
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Cell
@@ -10,7 +10,6 @@ module Cell
10
10
  puts "mouse clicked"
11
11
  p = parent
12
12
  parent.remove(self)
13
- p.parent.update # update the whole table incase a row can be removed.
14
13
  end
15
14
 
16
15
  end
@@ -1,10 +1,10 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  __ :name => "sandbox"
5
5
  __install "header.rb"
6
6
  arena do
7
- table do
7
+ table :scroll_bars => "on", :id => "one_table" do
8
8
  10.times do |y|
9
9
  row :id => y.to_s do
10
10
  10.times do |x|
@@ -15,7 +15,7 @@ arena do
15
15
  end
16
16
  end
17
17
  end
18
- table do
18
+ table :vertical_scroll_bar => "off", :horizontal_scroll_bar => "on", :id => "two_table" do
19
19
  2.times do |y|
20
20
  row :id => y.to_s do
21
21
  10.times do |x|
@@ -26,7 +26,7 @@ arena do
26
26
  end
27
27
  end
28
28
  end
29
- table do
29
+ table :vertical_scroll_bar => "on", :horizontal_scroll_bar => "off", :id => "three_table" do
30
30
  10.times do |y|
31
31
  row :id => y.to_s do
32
32
  2.times do |x|
@@ -37,4 +37,9 @@ arena do
37
37
  end
38
38
  end
39
39
  end
40
+ buttons_panel do
41
+ add_button :id => "one_button", :text => "Add Cell", :players => "button"
42
+ add_button :id => "two_button", :text => "Add Cell", :players => "button"
43
+ add_button :id => "three_button", :text => "Add Cell", :players => "button"
44
+ end
40
45
  end
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  table {
@@ -22,4 +22,13 @@ cell {
22
22
  text_color :black
23
23
  vertical_alignment :center
24
24
  horizontal_alignment :center
25
+ }
26
+
27
+ buttons_panel {
28
+ horizontal_alignment :center
29
+ width "100%"
30
+ }
31
+
32
+ add_button {
33
+ width 214
25
34
  }
@@ -1,4 +1,4 @@
1
- #- Copyright 2008 8th Light, Inc.
1
+ #- Copyright 2008 8th Light, Inc. All Rights Reserved.
2
2
  #- Limelight and all included source files are distributed under terms of the GNU LGPL.
3
3
 
4
4
  module Sketchpad