limelight 0.3.0-java → 0.3.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/init.rb +1 -1
- data/lib/limelight.jar +0 -0
- data/lib/limelight/builtin/players.rb +2 -1
- data/lib/limelight/builtin/players/combo_box.rb +2 -0
- data/lib/limelight/builtin/players/curtains.rb +1 -0
- data/lib/limelight/builtin/players/password_box.rb +34 -0
- data/lib/limelight/casting_director.rb +2 -1
- data/lib/limelight/client/playbills.rb +83 -0
- data/lib/limelight/commands/command.rb +14 -2
- data/lib/limelight/commands/help_command.rb +50 -0
- data/lib/limelight/commands/unpack_command.rb +44 -0
- data/lib/limelight/commands/version_command.rb +31 -0
- data/lib/limelight/data.rb +47 -0
- data/lib/limelight/java_couplings.rb +1 -0
- data/lib/limelight/limelight_exception.rb +13 -0
- data/lib/limelight/main.rb +22 -24
- data/lib/limelight/producer.rb +3 -2
- data/lib/limelight/prop.rb +2 -1
- data/lib/limelight/scene.rb +8 -1
- data/lib/limelight/util/downloader.rb +113 -0
- data/lib/limelight/version.rb +1 -1
- data/productions/examples/8thlight.com/styles.rb +147 -149
- data/productions/examples/calculator/styles.rb +2 -4
- data/productions/examples/langstons_ant/styles.rb +1 -2
- data/productions/examples/sandbox/click_me/players/chromaton.rb +2 -3
- data/productions/examples/sandbox/click_me/styles.rb +6 -7
- data/productions/examples/sandbox/floaters/players/floater.rb +2 -2
- data/productions/examples/sandbox/floaters/styles.rb +1 -2
- data/productions/examples/sandbox/frameing/players/sandbox.rb +14 -0
- data/productions/examples/sandbox/frameing/props.rb +32 -0
- data/productions/examples/sandbox/frameing/styles.rb +42 -0
- data/productions/examples/sandbox/header.rb +1 -0
- data/productions/examples/sandbox/homer/styles.rb +1 -2
- data/productions/examples/sandbox/images_scene/styles.rb +3 -2
- data/productions/examples/sandbox/inputs/styles.rb +0 -1
- data/productions/examples/sandbox/rounded_corners/styles.rb +1 -2
- data/productions/examples/sandbox/scrolling/styles.rb +1 -2
- data/productions/examples/sandbox/styles.rb +7 -9
- data/productions/examples/sandbox/teaser/styles.rb +1 -2
- data/productions/examples/tutorials/tutorial_1/styles.rb +2 -4
- data/productions/startup/stages.rb +6 -0
- data/productions/startup/{players → welcome/players}/browse_button.rb +0 -0
- data/productions/startup/{players → welcome/players}/download_button.rb +3 -3
- data/productions/startup/{players → welcome/players}/sandbox_button.rb +0 -0
- data/productions/startup/{props.rb → welcome/props.rb} +0 -0
- data/productions/startup/{styles.rb → welcome/styles.rb} +0 -0
- data/spec/builtin/players/password_box_spec.rb +27 -0
- data/spec/client/playbills_spec.rb +76 -0
- data/spec/commands/help_command_spec.rb +39 -0
- data/spec/commands/unpack_command_spec.rb +44 -0
- data/spec/data_spec.rb +47 -0
- data/spec/main_spec.rb +20 -0
- data/spec/prop_spec.rb +18 -0
- data/spec/scene_spec.rb +43 -0
- data/spec/spec_helper.rb +2 -1
- data/spec/util/downloader_spec.rb +89 -0
- metadata +33 -11
- data/productions/examples/sandbox.llp +0 -0
@@ -4,8 +4,7 @@
|
|
4
4
|
calculator {
|
5
5
|
width 1000
|
6
6
|
height 900
|
7
|
-
|
8
|
-
vertical_alignment :top
|
7
|
+
alignment "top center"
|
9
8
|
background_color :blue
|
10
9
|
}
|
11
10
|
|
@@ -31,8 +30,7 @@ button {
|
|
31
30
|
background_color :white
|
32
31
|
text_color :black
|
33
32
|
font_size 20
|
34
|
-
|
35
|
-
vertical_alignment :center
|
33
|
+
alignment :center
|
36
34
|
border_width 10
|
37
35
|
border_color :black
|
38
36
|
}
|
@@ -2,11 +2,10 @@
|
|
2
2
|
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
3
|
|
4
4
|
chromaton {
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
vertical_alignment :center
|
5
|
+
width 100
|
6
|
+
height 100
|
7
|
+
background_color :red
|
8
|
+
text_color :white
|
9
|
+
font_size 12
|
10
|
+
alignment :center
|
12
11
|
}
|
@@ -24,7 +24,7 @@ module Floater
|
|
24
24
|
|
25
25
|
def new_x=(value)
|
26
26
|
@x = value
|
27
|
-
style.x = (value.to_i - width/2)
|
27
|
+
style.x = (value.to_i - width/2)
|
28
28
|
end
|
29
29
|
|
30
30
|
def y
|
@@ -34,7 +34,7 @@ module Floater
|
|
34
34
|
|
35
35
|
def new_y=(value)
|
36
36
|
@y = value
|
37
|
-
style.y = (value.to_i - width/2)
|
37
|
+
style.y = (value.to_i - width/2)
|
38
38
|
end
|
39
39
|
|
40
40
|
def center
|
@@ -0,0 +1,32 @@
|
|
1
|
+
hamlet = <<END
|
2
|
+
To be, or not to be. That is the question. Whether tis nobler in the mind to suffer the slings and arrows of time,
|
3
|
+
or to take arms against a sea of troubles and by opposing, end them.
|
4
|
+
END
|
5
|
+
|
6
|
+
__ :name => "sandbox"
|
7
|
+
__install "header.rb"
|
8
|
+
arena :vertical_alignment => :center do
|
9
|
+
control_panel do
|
10
|
+
setting do
|
11
|
+
label :text => "Margin:"
|
12
|
+
input :players => "text_box", :text => "10%", :on_focus_lost => "scene.apply(:margin, text)"
|
13
|
+
end
|
14
|
+
setting do
|
15
|
+
label :text => "Border Width:"
|
16
|
+
input :players => "text_box", :text => "10%", :on_focus_lost => "scene.apply(:border_width, text)"
|
17
|
+
end
|
18
|
+
setting do
|
19
|
+
label :text => "Padding:"
|
20
|
+
input :players => "text_box", :text => "10%", :on_focus_lost => "scene.apply(:padding, text)"
|
21
|
+
end
|
22
|
+
setting do
|
23
|
+
label :text => "Rounded Corner Radius:"
|
24
|
+
input :players => "text_box", :text => "10%", :on_focus_lost => "scene.apply(:rounded_corner_radius, text)"
|
25
|
+
end
|
26
|
+
end
|
27
|
+
image_area do
|
28
|
+
box do
|
29
|
+
subject :id => "subject", :text => hamlet
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,42 @@
|
|
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
|
+
alignment :center
|
24
|
+
background_color :light_gray
|
25
|
+
}
|
26
|
+
|
27
|
+
box {
|
28
|
+
background_color :tan
|
29
|
+
width :auto
|
30
|
+
height :auto
|
31
|
+
}
|
32
|
+
|
33
|
+
subject {
|
34
|
+
width "300"
|
35
|
+
height "300"
|
36
|
+
margin "10%"
|
37
|
+
border_width "10%"
|
38
|
+
padding "10%"
|
39
|
+
rounded_corner_radius "10%"
|
40
|
+
border_color :black
|
41
|
+
background_color :yellow
|
42
|
+
}
|
@@ -13,5 +13,6 @@ header do
|
|
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
15
|
example_link :text => "Images", :on_mouse_clicked => "scene.load('images_scene')"
|
16
|
+
example_link :text => "Frameing", :on_mouse_clicked => "scene.load('frameing')"
|
16
17
|
end
|
17
18
|
|
@@ -2,16 +2,15 @@
|
|
2
2
|
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
3
3
|
|
4
4
|
sandbox {
|
5
|
-
|
6
|
-
|
7
|
-
|
5
|
+
width "100%"
|
6
|
+
height "100%"
|
7
|
+
vertical_alignment :top
|
8
8
|
}
|
9
9
|
|
10
10
|
arena {
|
11
11
|
width "100%"
|
12
|
-
|
13
|
-
|
14
|
-
vertical_alignment :center
|
12
|
+
height 800
|
13
|
+
alignment :center
|
15
14
|
}
|
16
15
|
|
17
16
|
header {
|
@@ -20,15 +19,14 @@ header {
|
|
20
19
|
background_color "#888"
|
21
20
|
border_color :blue
|
22
21
|
border_width 1
|
23
|
-
|
22
|
+
alignment :center
|
24
23
|
}
|
25
24
|
|
26
25
|
example_link {
|
27
26
|
width 100
|
28
27
|
height 48
|
29
28
|
font_size 12
|
30
|
-
|
31
|
-
vertical_alignment :center
|
29
|
+
alignment :center
|
32
30
|
text_color :blue
|
33
31
|
hover {
|
34
32
|
text_color :white
|
@@ -5,16 +5,14 @@ backdrop {
|
|
5
5
|
background_color "black"
|
6
6
|
width "100%"
|
7
7
|
height "100%"
|
8
|
-
|
9
|
-
vertical_alignment "center"
|
8
|
+
alignment "center"
|
10
9
|
}
|
11
10
|
|
12
11
|
sample {
|
13
12
|
width 100
|
14
13
|
height 100
|
15
14
|
margin 5
|
16
|
-
|
17
|
-
vertical_alignment "center"
|
15
|
+
alignment "center"
|
18
16
|
font_size "18"
|
19
17
|
font_style "bold"
|
20
18
|
text_color "white"
|
File without changes
|
@@ -5,10 +5,10 @@ module DownloadButton
|
|
5
5
|
|
6
6
|
def mouse_clicked(e)
|
7
7
|
url = scene.find("url_field").text
|
8
|
-
downloader = Limelight::Context.instance.downloader
|
9
8
|
begin
|
10
|
-
|
11
|
-
|
9
|
+
puts "url: #{url}"
|
10
|
+
file = Limelight::Util::Downloader.download(url.strip)
|
11
|
+
scene.open_production(file)
|
12
12
|
rescue Exception => e
|
13
13
|
scene.stage.alert(e.to_s)
|
14
14
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,27 @@
|
|
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
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
5
|
+
require 'limelight/prop'
|
6
|
+
require 'limelight/builtin/players/password_box'
|
7
|
+
|
8
|
+
describe Limelight::Builtin::Players::PasswordBox do
|
9
|
+
|
10
|
+
before(:each) do
|
11
|
+
@prop = Limelight::Prop.new
|
12
|
+
@prop.include_player(Limelight::Builtin::Players::PasswordBox)
|
13
|
+
end
|
14
|
+
|
15
|
+
it "should have a PasswordBox" do
|
16
|
+
@prop.panel.children[0].class.should == Limelight::UI::Model::Inputs::PasswordBoxPanel
|
17
|
+
end
|
18
|
+
|
19
|
+
it "should use the PasswordBox for the text accessor" do
|
20
|
+
@prop.text = "blah"
|
21
|
+
@prop.panel.children[0].text.should == "blah"
|
22
|
+
|
23
|
+
@prop.panel.children[0].text = "harumph"
|
24
|
+
@prop.text.should == "harumph"
|
25
|
+
end
|
26
|
+
|
27
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
require 'limelight/client/playbills'
|
3
|
+
|
4
|
+
describe Limelight::Client::Playbills do
|
5
|
+
|
6
|
+
before(:each) do
|
7
|
+
@xml = <<END
|
8
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
9
|
+
<playbills type="array">
|
10
|
+
<playbill>
|
11
|
+
<author>Jim Weirich and Micah Martin</author>
|
12
|
+
<created-at type="datetime">2009-01-02T17:07:26Z</created-at>
|
13
|
+
<description>The classic game of memory.</description>
|
14
|
+
<id type="integer">1</id>
|
15
|
+
<name>simon</name>
|
16
|
+
<size>270418</size>
|
17
|
+
<title>Limelight Simon</title>
|
18
|
+
<updated-at type="datetime">2009-01-02T17:07:26Z</updated-at>
|
19
|
+
<version>1.0</version>
|
20
|
+
<llp-path>/playbills/1.llp</llp-path>
|
21
|
+
<thumbnail-path>/playbills/1.thumbnail</thumbnail-path>
|
22
|
+
</playbill>
|
23
|
+
</playbills>
|
24
|
+
END
|
25
|
+
|
26
|
+
@response = mock("response")
|
27
|
+
end
|
28
|
+
|
29
|
+
it "should translate xml with 1 playbill" do
|
30
|
+
playbills = Limelight::Client::Playbills.from_xml(@xml)
|
31
|
+
playbills.length.should == 1
|
32
|
+
|
33
|
+
simon = playbills[0]
|
34
|
+
simon.name.should == "simon"
|
35
|
+
simon.title.should == "Limelight Simon"
|
36
|
+
simon.size.should == "270418"
|
37
|
+
simon.updated_at.year.should == 2009
|
38
|
+
simon.created_at.year.should == 2009
|
39
|
+
simon.thumbnail_path.should == "/playbills/1.thumbnail"
|
40
|
+
simon.llp_path.should == "/playbills/1.llp"
|
41
|
+
simon.author.should == "Jim Weirich and Micah Martin"
|
42
|
+
simon.description.should == "The classic game of memory."
|
43
|
+
end
|
44
|
+
|
45
|
+
it "should get all the playbills from a URL" do
|
46
|
+
Net::HTTP.should_receive(:get_response).with(URI.parse("http://localhost:3000/playbills.xml")).and_return(@response)
|
47
|
+
@response.should_receive(:body).and_return(@xml)
|
48
|
+
|
49
|
+
playbills = Limelight::Client::Playbills.from_url("http://localhost:3000/playbills.xml")
|
50
|
+
|
51
|
+
playbills.length.should == 1
|
52
|
+
playbills[0].uri.host.should == "localhost"
|
53
|
+
playbills[0].uri.port.should == 3000
|
54
|
+
end
|
55
|
+
|
56
|
+
it "should get the thumbnail for a playbill" do
|
57
|
+
playbill = Limelight::Client::Playbill.new(URI.parse("http://localhost:3000/playbills.xml"))
|
58
|
+
playbill.thumbnail_path = "/playbills/1.thumbnail"
|
59
|
+
|
60
|
+
Net::HTTP.should_receive(:get_response).with(URI.parse("http://localhost:3000/playbills/1.thumbnail")).and_return(@response)
|
61
|
+
@response.should_receive(:body).and_return("blah")
|
62
|
+
|
63
|
+
playbill.thumbnail.should == "blah"
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should get the thumbnail for a playbill" do
|
67
|
+
playbill = Limelight::Client::Playbill.new(URI.parse("http://localhost:3000/playbills.xml"))
|
68
|
+
playbill.llp_path = "/playbills/1.llp"
|
69
|
+
|
70
|
+
Net::HTTP.should_receive(:get_response).with(URI.parse("http://localhost:3000/playbills/1.llp")).and_return(@response)
|
71
|
+
@response.should_receive(:body).and_return("blah")
|
72
|
+
|
73
|
+
playbill.llp.should == "blah"
|
74
|
+
end
|
75
|
+
|
76
|
+
end
|