limelight 0.2.1-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/ll.bat +1 -1
- data/lib/i4jruntime.jar +0 -0
- data/lib/junit-4.4.jar +0 -0
- data/lib/limelight.jar +0 -0
- data/lib/limelight/animation.rb +3 -3
- data/lib/limelight/builtin/players.rb +2 -1
- data/lib/limelight/builtin/players/combo_box.rb +8 -2
- data/lib/limelight/builtin/players/image.rb +47 -0
- data/lib/limelight/builtin/styles.rb +1 -1
- data/lib/limelight/casting_director.rb +70 -39
- data/lib/limelight/commands/command.rb +150 -0
- data/lib/limelight/commands/create_command.rb +79 -0
- data/lib/limelight/commands/freeze_command.rb +113 -0
- data/lib/limelight/commands/open_command.rb +49 -0
- data/lib/limelight/commands/pack_command.rb +45 -0
- data/lib/limelight/dsl/build_exception.rb +51 -0
- data/lib/limelight/dsl/menu_bar.rb +71 -0
- data/lib/limelight/dsl/production_builder.rb +71 -0
- data/lib/limelight/dsl/prop_builder.rb +155 -0
- data/lib/limelight/dsl/stage_builder.rb +105 -0
- data/lib/limelight/dsl/styles_builder.rb +134 -0
- data/lib/limelight/file_loader.rb +46 -0
- data/lib/limelight/gems.rb +45 -0
- data/lib/limelight/java_couplings.rb +7 -2
- data/lib/limelight/java_util.rb +2 -15
- data/lib/limelight/main.rb +7 -5
- data/lib/limelight/producer.rb +87 -66
- data/lib/limelight/production.rb +42 -4
- data/lib/limelight/prop.rb +84 -70
- data/lib/limelight/scene.rb +75 -20
- data/lib/limelight/specs/spec_helper.rb +58 -0
- data/lib/limelight/stage.rb +11 -6
- data/lib/limelight/string.rb +35 -0
- data/lib/limelight/studio.rb +29 -0
- data/lib/limelight/templates/production_templater.rb +42 -0
- data/lib/limelight/templates/scene_templater.rb +41 -0
- data/lib/limelight/templates/sources/freezing/limelight_init.rb.template +5 -0
- data/lib/limelight/templates/sources/production/init.rb.template +15 -0
- data/lib/limelight/templates/sources/production/production.rb.template +9 -0
- data/lib/limelight/templates/sources/production/stages.rb.template +17 -0
- data/lib/limelight/templates/sources/production/styles.rb.template +12 -0
- data/lib/limelight/templates/sources/scene/props.rb.template +6 -0
- data/lib/limelight/templates/sources/scene/styles.rb.template +18 -0
- data/lib/limelight/templates/templater.rb +128 -0
- data/lib/limelight/templates/templater_logger.rb +36 -0
- data/lib/limelight/theater.rb +21 -7
- data/lib/limelight/util.rb +22 -6
- data/lib/limelight/version.rb +2 -2
- data/productions/examples/8thlight.com/styles.rb +1 -1
- data/productions/examples/langstons_ant/html_javascript/ant.html +1 -1
- data/productions/examples/langstons_ant/init.rb +1 -0
- data/productions/examples/langstons_ant/players/log.rb +2 -2
- data/productions/examples/langstons_ant/players/world.rb +0 -26
- data/productions/examples/sandbox.llp +0 -0
- data/productions/examples/sandbox/click_me/players/chromaton.rb +10 -4
- data/productions/examples/sandbox/floaters/players/floater.rb +4 -2
- data/productions/examples/sandbox/gradients/players/spinner.rb +5 -1
- data/productions/examples/sandbox/gradients/players/teaser.rb +2 -2
- data/productions/examples/sandbox/gradients/players/wave.rb +2 -2
- data/productions/examples/sandbox/gradients/players/waves.rb +2 -2
- data/productions/examples/sandbox/header.rb +1 -0
- data/productions/examples/sandbox/images/logo.png +0 -0
- data/productions/examples/sandbox/images_scene/props.rb +25 -0
- data/productions/examples/sandbox/images_scene/styles.rb +30 -0
- data/productions/examples/sandbox/inputs/styles.rb +1 -1
- data/productions/examples/sandbox/scrolling/props.rb +12 -12
- data/productions/examples/sandbox/teaser/players/fader.rb +2 -8
- data/productions/stage_composer/inspector/styles.rb +2 -2
- data/productions/startup/styles.rb +2 -2
- data/spec/builtin/players/button_spec.rb +0 -1
- data/spec/builtin/players/image_spec.rb +41 -0
- data/spec/casting_director_spec.rb +114 -44
- data/spec/commands/command_spec.rb +18 -0
- data/spec/commands/create_command_spec.rb +74 -0
- data/spec/commands/freeze_command_spec.rb +59 -0
- data/spec/commands/open_command_spec.rb +30 -0
- data/spec/commands/pack_command_spec.rb +23 -0
- data/spec/dsl/production_builder_spec.rb +46 -0
- data/spec/{prop_builder_spec.rb → dsl/prop_builder_spec.rb} +80 -24
- data/spec/{stage_builder_spec.rb → dsl/stage_builder_spec.rb} +4 -4
- data/spec/{styles_builder_spec.rb → dsl/styles_builder_spec.rb} +6 -6
- data/spec/{loaders/file_loader_spec.rb → file_loader_spec.rb} +4 -4
- data/spec/gems_spec.rb +83 -0
- data/spec/java_util_spec.rb +1 -17
- data/spec/main_spec.rb +17 -0
- data/spec/producer_spec.rb +89 -79
- data/spec/production_spec.rb +28 -3
- data/spec/prop_spec.rb +82 -16
- data/spec/scene_spec.rb +73 -3
- data/spec/spec_helper.rb +37 -1
- data/spec/stage_spec.rb +10 -1
- data/spec/string_spec.rb +35 -0
- data/spec/studio_spec.rb +14 -0
- data/spec/styles_spec.rb +14 -0
- data/spec/templates/production_templater_spec.rb +44 -0
- data/spec/templates/scene_templater_spec.rb +25 -0
- data/spec/templates/templater_logger_spec.rb +38 -0
- data/spec/templates/templater_spec.rb +104 -0
- data/spec/theater_spec.rb +12 -21
- metadata +75 -23
- data/bin/icons/splash.png +0 -0
- data/lib/limelight/build_exception.rb +0 -48
- data/lib/limelight/commands.rb +0 -52
- data/lib/limelight/loaders/file_scene_loader.rb +0 -49
- data/lib/limelight/menu_bar.rb +0 -68
- data/lib/limelight/production_builder.rb +0 -66
- data/lib/limelight/prop_builder.rb +0 -119
- data/lib/limelight/stage_builder.rb +0 -103
- data/lib/limelight/styles_builder.rb +0 -131
- data/spec/commands_spec.rb +0 -34
- data/spec/production_builder_spec.rb +0 -48
@@ -0,0 +1,36 @@
|
|
1
|
+
module Limelight
|
2
|
+
module Templates
|
3
|
+
|
4
|
+
# Templaters uses this class to log activity.
|
5
|
+
#
|
6
|
+
class TemplaterLogger
|
7
|
+
|
8
|
+
# An accessor to the output IO. Defaults to STDOUT
|
9
|
+
#
|
10
|
+
attr_accessor :output
|
11
|
+
|
12
|
+
def initialize
|
13
|
+
@output = STDOUT
|
14
|
+
end
|
15
|
+
|
16
|
+
def creating_directory(name)
|
17
|
+
@output.puts "\tcreating directory: #{name}"
|
18
|
+
end
|
19
|
+
|
20
|
+
def creating_file(name)
|
21
|
+
@output.puts "\tcreating file: #{name}"
|
22
|
+
end
|
23
|
+
|
24
|
+
def file_already_exists(name)
|
25
|
+
@output.puts "\tfile already exists: #{name}"
|
26
|
+
end
|
27
|
+
|
28
|
+
def log(message, name)
|
29
|
+
spaces = 21 - message.length - 1
|
30
|
+
@output.puts "\t#{message}:#{' '*spaces}#{name}"
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
|
35
|
+
end
|
36
|
+
end
|
data/lib/limelight/theater.rb
CHANGED
@@ -14,26 +14,34 @@ module Limelight
|
|
14
14
|
attr_reader :active_stage
|
15
15
|
|
16
16
|
def initialize
|
17
|
-
@
|
17
|
+
@stages = {}
|
18
18
|
end
|
19
19
|
|
20
20
|
# Returns an Array of Stages that belong to this Theater.
|
21
21
|
#
|
22
22
|
def stages
|
23
|
-
return @
|
23
|
+
return @stages.values
|
24
|
+
end
|
25
|
+
|
26
|
+
# Returns true if the theater has at least one stage
|
27
|
+
#
|
28
|
+
def has_stages?
|
29
|
+
return stages.length > 0
|
24
30
|
end
|
25
31
|
|
26
32
|
# Returns the Stage with the spcified name, nil if none exist with the specified name.
|
27
33
|
#
|
28
34
|
def [](stage_name)
|
29
|
-
return @
|
35
|
+
return @stages[stage_name]
|
30
36
|
end
|
31
37
|
|
32
38
|
# Adds a Stage to the Theater. Raises an exception is the name of the Stage is duplicated.
|
33
39
|
#
|
34
|
-
def add_stage(
|
35
|
-
raise LimelightException.new("Duplicate stage name: '#{
|
36
|
-
|
40
|
+
def add_stage(name)
|
41
|
+
raise LimelightException.new("Duplicate stage name: '#{name}'") if @stages[name]
|
42
|
+
stage = build_stage(name)
|
43
|
+
@stages[name] = stage
|
44
|
+
return stage
|
37
45
|
end
|
38
46
|
|
39
47
|
# Lets the Theater know which stage has the limelight (currently active).
|
@@ -45,9 +53,15 @@ module Limelight
|
|
45
53
|
# If no Stages are added, the Theater will provide a default Stage named "Limelight".
|
46
54
|
#
|
47
55
|
def default_stage
|
48
|
-
add_stage(
|
56
|
+
add_stage("Limelight") if self["Limelight"].nil?
|
49
57
|
return self["Limelight"]
|
50
58
|
end
|
59
|
+
|
60
|
+
protected #############################################
|
61
|
+
|
62
|
+
def build_stage(name)
|
63
|
+
return Limelight::Stage.new(self, name)
|
64
|
+
end
|
51
65
|
|
52
66
|
end
|
53
67
|
|
data/lib/limelight/util.rb
CHANGED
@@ -9,19 +9,18 @@ module Limelight
|
|
9
9
|
|
10
10
|
# Returns true if the specified file is a directory and has the structure of a Scene.
|
11
11
|
#
|
12
|
-
def self.is_limelight_scene?(
|
13
|
-
return
|
12
|
+
def self.is_limelight_scene?(dir)
|
13
|
+
return directory_contains_file(dir, "props.rb")
|
14
14
|
end
|
15
15
|
|
16
16
|
# Returns true if the specified file is a directory and has the structure of a Production.
|
17
|
-
|
18
|
-
|
19
|
-
return is_directory_containing_file?(file, "stages.rb")
|
17
|
+
def self.is_limelight_production?(dir)
|
18
|
+
return directory_contains_file(dir, "stages.rb")
|
20
19
|
end
|
21
20
|
|
22
21
|
# Returns true of the file is a directory containing an entry named file_name.
|
23
22
|
#
|
24
|
-
def self.
|
23
|
+
def self.directory_contains_file(file, file_name)
|
25
24
|
if file.is_a? String
|
26
25
|
return File.directory?(file) && File.exists?(File.join(file, file_name))
|
27
26
|
else
|
@@ -45,4 +44,21 @@ module Limelight
|
|
45
44
|
|
46
45
|
end
|
47
46
|
|
47
|
+
end
|
48
|
+
|
49
|
+
class Module
|
50
|
+
|
51
|
+
def prop_reader(*symbols)
|
52
|
+
symbols.each do |sym|
|
53
|
+
define_method(sym) do
|
54
|
+
value = instance_variable_get("@#{sym}")
|
55
|
+
if value.nil?
|
56
|
+
value = scene.find(sym.to_s)
|
57
|
+
instance_variable_set("@#{sym}", value) unless value.nil?
|
58
|
+
end
|
59
|
+
return value
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
48
64
|
end
|
data/lib/limelight/version.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
<head>
|
3
3
|
<title>Langston's Ant</title>
|
4
4
|
<link rel=StyleSheet href="ant.css" type="text/css" media="screen, print"/>
|
5
|
-
<script language="JavaScript" src="ant.js"
|
5
|
+
<script language="JavaScript" src="ant.js"></script>
|
6
6
|
</head>
|
7
7
|
<body onload="load()">
|
8
8
|
<div id="title">
|
@@ -0,0 +1 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/players/ant")
|
@@ -17,12 +17,12 @@ module Log
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def count
|
20
|
-
@count =
|
20
|
+
@count = scene.find("count") if not @count
|
21
21
|
return @count
|
22
22
|
end
|
23
23
|
|
24
24
|
def location
|
25
|
-
@location =
|
25
|
+
@location = scene.find("location") if not @location
|
26
26
|
return @location
|
27
27
|
end
|
28
28
|
|
@@ -1,33 +1,7 @@
|
|
1
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
|
-
load File.expand_path(File.dirname(__FILE__) + "/ant.rb")
|
5
|
-
|
6
4
|
module World
|
7
|
-
|
8
|
-
# def self.extended(prop)
|
9
|
-
# create_time = 0
|
10
|
-
# add_time = 0
|
11
|
-
#
|
12
|
-
# prop.cell_index = {}
|
13
|
-
# 50.times do |y|
|
14
|
-
# 50.times do |x|
|
15
|
-
# id = "#{x},#{y}"
|
16
|
-
# start = Time.now
|
17
|
-
# cell = Limelight::Prop.new(:name => "cell", :id => id)
|
18
|
-
# create_time += Time.now - start
|
19
|
-
# start = Time.now
|
20
|
-
# prop.add(cell)
|
21
|
-
# add_time += Time.now - start
|
22
|
-
# prop.cell_index[id] = cell
|
23
|
-
# end
|
24
|
-
# end
|
25
|
-
# puts "create_time: #{create_time}"
|
26
|
-
# puts "add_time: #{add_time}"
|
27
|
-
# # create_time: 3.2059999999998325
|
28
|
-
# # add_time: 0.5010000000000002
|
29
|
-
#
|
30
|
-
# end
|
31
5
|
|
32
6
|
def self.extended(prop)
|
33
7
|
prop.cells = {}
|
Binary file
|
@@ -12,13 +12,12 @@ module Chromaton
|
|
12
12
|
extended_block.clicks = 0
|
13
13
|
extended_block.text = "Click Me!"
|
14
14
|
end
|
15
|
-
|
16
|
-
def mouse_clicked(e)
|
15
|
+
|
16
|
+
def mouse_clicked(e)
|
17
17
|
@clicks += 1
|
18
18
|
new_random_color
|
19
19
|
new_random_size
|
20
20
|
update_text
|
21
|
-
parent.update
|
22
21
|
end
|
23
22
|
|
24
23
|
private
|
@@ -27,12 +26,19 @@ module Chromaton
|
|
27
26
|
r = rand(255)
|
28
27
|
g = rand(255)
|
29
28
|
b = rand(255)
|
30
|
-
@new_color =
|
29
|
+
@new_color = "##{as_2_digit_hex(r)}#{as_2_digit_hex(g)}#{as_2_digit_hex(b)}"
|
31
30
|
style.background_color = @new_color
|
32
31
|
end
|
32
|
+
|
33
|
+
def as_2_digit_hex(number)
|
34
|
+
value = sprintf("%x", number)
|
35
|
+
value << "0" if value.length == 1
|
36
|
+
return value;
|
37
|
+
end
|
33
38
|
|
34
39
|
def new_random_size
|
35
40
|
@size = rand(500) + 50
|
41
|
+
puts "@size: #{@size}"
|
36
42
|
style.width = @size.to_s
|
37
43
|
style.height = @size.to_s
|
38
44
|
end
|
@@ -62,8 +62,9 @@ module Floater
|
|
62
62
|
def calculate_vector(sx, sy)
|
63
63
|
dx = (x - sx)
|
64
64
|
dy = (y - sy)
|
65
|
-
|
66
|
-
@
|
65
|
+
abs_delta = (dx.abs + dy.abs).to_f
|
66
|
+
@x_coefficient = dx / abs_delta
|
67
|
+
@y_coefficient = dy / abs_delta
|
67
68
|
@velocity = 20
|
68
69
|
find_bounds if @max_x.nil?
|
69
70
|
end
|
@@ -79,6 +80,7 @@ module Floater
|
|
79
80
|
@velocity -= @velocity * FRICTION
|
80
81
|
else
|
81
82
|
@sliding = false
|
83
|
+
|
82
84
|
@animation.stop
|
83
85
|
end
|
84
86
|
end
|
@@ -5,7 +5,11 @@ module Spinner
|
|
5
5
|
|
6
6
|
def mouse_entered(e)
|
7
7
|
@animation = animate(:updates_per_second => 30) do
|
8
|
-
|
8
|
+
if style.gradient_angle == "359"
|
9
|
+
style.gradient_angle = "0"
|
10
|
+
else
|
11
|
+
style.gradient_angle = (style.gradient_angle.to_i + 1).to_s
|
12
|
+
end
|
9
13
|
end
|
10
14
|
end
|
11
15
|
|
@@ -6,8 +6,8 @@ module Teaser
|
|
6
6
|
def mouse_entered(e)
|
7
7
|
@step = -1
|
8
8
|
@animation = animate(:updates_per_second => 30) do
|
9
|
-
@step = -1 if style.gradient_penetration == "100"
|
10
|
-
@step = 1 if style.gradient_penetration == "1"
|
9
|
+
@step = -1 if style.gradient_penetration == "100%"
|
10
|
+
@step = 1 if style.gradient_penetration == "1%"
|
11
11
|
style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
|
12
12
|
end
|
13
13
|
end
|
@@ -6,8 +6,8 @@ module Wave
|
|
6
6
|
def mouse_entered(e)
|
7
7
|
@step = -1
|
8
8
|
@animation = animate(:updates_per_second => 30) do
|
9
|
-
@step = -1 if style.gradient_penetration == "100"
|
10
|
-
@step = 1 if style.gradient_penetration == "1"
|
9
|
+
@step = -1 if style.gradient_penetration == "100%"
|
10
|
+
@step = 1 if style.gradient_penetration == "1%"
|
11
11
|
style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
|
12
12
|
end
|
13
13
|
end
|
@@ -6,8 +6,8 @@ module Waves
|
|
6
6
|
def mouse_entered(e)
|
7
7
|
@step = -1
|
8
8
|
@animation = animate(:updates_per_second => 30) do
|
9
|
-
@step = -1 if style.gradient_penetration == "100"
|
10
|
-
@step = 1 if style.gradient_penetration == "1"
|
9
|
+
@step = -1 if style.gradient_penetration == "100%"
|
10
|
+
@step = 1 if style.gradient_penetration == "1%"
|
11
11
|
style.gradient_penetration = (style.gradient_penetration.to_i + @step).to_s
|
12
12
|
end
|
13
13
|
end
|
@@ -12,5 +12,6 @@ header do
|
|
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
14
|
example_link :text => "Sound", :on_mouse_clicked => "scene.load('sounds')"
|
15
|
+
example_link :text => "Images", :on_mouse_clicked => "scene.load('images_scene')"
|
15
16
|
end
|
16
17
|
|
Binary file
|
@@ -0,0 +1,25 @@
|
|
1
|
+
__ :name => "sandbox"
|
2
|
+
__install "header.rb"
|
3
|
+
arena :vertical_alignment => :center do
|
4
|
+
control_panel do
|
5
|
+
setting do
|
6
|
+
label :text => "Width:"
|
7
|
+
input :players => "text_box", :text => "auto", :on_focus_lost => "scene.find('logo').style.width = text"
|
8
|
+
end
|
9
|
+
setting do
|
10
|
+
label :text => "Height:"
|
11
|
+
input :players => "text_box", :text => "auto", :on_focus_lost => "scene.find('logo').style.height = text"
|
12
|
+
end
|
13
|
+
setting do
|
14
|
+
label :text => "Scaled:", :width => "100%"
|
15
|
+
input :players => "check_box", :checked => true, :on_button_pressed => "scene.find('logo').scaled = checked?"
|
16
|
+
end
|
17
|
+
setting do
|
18
|
+
label :text => "Rotation:"
|
19
|
+
input :players => "text_box", :text => "0", :on_focus_lost => "scene.find('logo').rotation = text.to_f"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
image_area do
|
23
|
+
logo :id => "logo", :players => "image", :image => "images/logo.png"
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
control_panel {
|
2
|
+
width "100%"
|
3
|
+
background_color :gray
|
4
|
+
secondary_background_color :dark_green
|
5
|
+
gradient_angle 270
|
6
|
+
gradient :on
|
7
|
+
horizontal_alignment :center
|
8
|
+
padding 10
|
9
|
+
}
|
10
|
+
|
11
|
+
setting {
|
12
|
+
width 120
|
13
|
+
}
|
14
|
+
|
15
|
+
label {
|
16
|
+
text_color :white
|
17
|
+
font_style "bold"
|
18
|
+
}
|
19
|
+
|
20
|
+
image_area {
|
21
|
+
width "100%"
|
22
|
+
height "90%"
|
23
|
+
horizontal_alignment :center
|
24
|
+
vertical_alignment :center
|
25
|
+
background_color :light_gray
|
26
|
+
}
|
27
|
+
|
28
|
+
logo {
|
29
|
+
border_width 1
|
30
|
+
}
|
@@ -4,35 +4,35 @@
|
|
4
4
|
__ :name => "sandbox"
|
5
5
|
__install "header.rb"
|
6
6
|
arena do
|
7
|
-
table :
|
7
|
+
table :scrollbars => "on", :id => "one_table" do
|
8
8
|
10.times do |y|
|
9
|
-
row :id => y
|
9
|
+
row :id => "a_#{y}" do
|
10
10
|
10.times do |x|
|
11
|
-
id = "#{x},#{y}"
|
11
|
+
id = "a_#{x},#{y}"
|
12
12
|
bg_color = ( (x + y) % 2 == 0 ) ? "blue" : "#DDDDDD"
|
13
|
-
cell :id => id, :text =>
|
13
|
+
cell :id => id, :text => "#{x},#{y}", :background_color => bg_color
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
18
|
-
table :
|
18
|
+
table :vertical_scrollbar => "off", :horizontal_scrollbar => "on", :id => "two_table" do
|
19
19
|
2.times do |y|
|
20
|
-
row :id => y
|
20
|
+
row :id => "b_#{y}" do
|
21
21
|
10.times do |x|
|
22
|
-
id = "#{x},#{y}"
|
22
|
+
id = "b_#{x},#{y}"
|
23
23
|
bg_color = ( (x + y) % 2 == 0 ) ? "blue" : "#DDDDDD"
|
24
|
-
cell :id => id, :text =>
|
24
|
+
cell :id => id, :text => "#{x},#{y}", :background_color => bg_color
|
25
25
|
end
|
26
26
|
end
|
27
27
|
end
|
28
28
|
end
|
29
|
-
table :
|
29
|
+
table :vertical_scrollbar => "on", :horizontal_scrollbar => "off", :id => "three_table" do
|
30
30
|
10.times do |y|
|
31
|
-
row :id => y
|
31
|
+
row :id => "c_#{y}" do
|
32
32
|
2.times do |x|
|
33
|
-
id = "#{x},#{y}"
|
33
|
+
id = "c_#{x},#{y}"
|
34
34
|
bg_color = ( (x + y) % 2 == 0 ) ? "blue" : "#DDDDDD"
|
35
|
-
cell :id => id, :text =>
|
35
|
+
cell :id => id, :text => "#{x},#{y}", :background_color => bg_color
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|