limelight 0.3.1-java → 0.4.0-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 +5 -2
- data/lib/limelight/animation.rb +2 -2
- data/lib/limelight/builtin/players/button.rb +1 -1
- data/lib/limelight/builtin/players/check_box.rb +1 -1
- data/lib/limelight/builtin/players/combo_box.rb +2 -4
- data/lib/limelight/builtin/players/combo_box_popup_list.rb +1 -1
- data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +1 -1
- data/lib/limelight/builtin/players/curtains.rb +1 -1
- data/lib/limelight/builtin/players/image.rb +3 -0
- data/lib/limelight/builtin/players/password_box.rb +1 -1
- data/lib/limelight/builtin/players/radio_button.rb +1 -1
- data/lib/limelight/builtin/players/text_area.rb +1 -1
- data/lib/limelight/builtin/players/text_box.rb +1 -1
- data/lib/limelight/builtin/players.rb +1 -1
- data/lib/limelight/builtin/styles.rb +1 -1
- data/lib/limelight/builtin/utilities_production/alert/props.rb +5 -0
- data/lib/limelight/builtin/utilities_production/alert/styles.rb +7 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/props.rb +17 -0
- data/lib/limelight/builtin/utilities_production/incompatible_version/styles.rb +9 -0
- data/lib/limelight/builtin/utilities_production/production.rb +59 -0
- data/lib/limelight/builtin/utilities_production/stages.rb +9 -0
- data/lib/limelight/builtin/utilities_production/styles.rb +50 -0
- data/lib/limelight/button_group_cache.rb +1 -1
- data/lib/limelight/casting_director.rb +1 -1
- data/lib/limelight/client/playbills.rb +3 -0
- data/lib/limelight/commands/command.rb +13 -7
- data/lib/limelight/commands/create_command.rb +13 -8
- data/lib/limelight/commands/freeze_command.rb +3 -0
- data/lib/limelight/commands/help_command.rb +12 -1
- data/lib/limelight/commands/open_command.rb +11 -1
- data/lib/limelight/commands/pack_command.rb +1 -1
- data/lib/limelight/commands/unpack_command.rb +1 -1
- data/lib/limelight/commands/version_command.rb +1 -1
- data/lib/limelight/data.rb +4 -14
- data/lib/limelight/dsl/build_exception.rb +12 -8
- data/lib/limelight/dsl/menu_bar.rb +1 -1
- data/lib/limelight/dsl/production_builder.rb +1 -1
- data/lib/limelight/dsl/prop_builder.rb +2 -2
- data/lib/limelight/dsl/stage_builder.rb +3 -3
- data/lib/limelight/dsl/styles_builder.rb +2 -1
- data/lib/limelight/file_chooser.rb +1 -1
- data/lib/limelight/file_filter.rb +1 -1
- data/lib/limelight/file_loader.rb +1 -1
- data/lib/limelight/gems.rb +4 -0
- data/lib/limelight/java_couplings.rb +3 -2
- data/lib/limelight/java_util.rb +1 -1
- data/lib/limelight/limelight_exception.rb +1 -1
- data/lib/limelight/main.rb +1 -1
- data/lib/limelight/paint_action.rb +1 -1
- data/lib/limelight/pen.rb +1 -1
- data/lib/limelight/producer.rb +52 -37
- data/lib/limelight/production.rb +81 -43
- data/lib/limelight/prop.rb +32 -13
- data/lib/limelight/scene.rb +19 -14
- data/lib/limelight/specs/spec_helper.rb +55 -28
- data/lib/limelight/stage.rb +163 -23
- data/lib/limelight/string.rb +3 -0
- data/lib/limelight/studio.rb +143 -6
- data/lib/limelight/styles.rb +14 -1
- data/lib/limelight/templates/production_templater.rb +6 -2
- data/lib/limelight/templates/scene_templater.rb +12 -7
- data/lib/limelight/templates/sources/production/production.rb.template +46 -6
- data/lib/limelight/templates/sources/production/spec/spec_helper.rb.template +5 -0
- data/lib/limelight/templates/sources/scene_spec/scene_spec.rb.template +13 -0
- data/lib/limelight/templates/templater.rb +4 -1
- data/lib/limelight/templates/templater_logger.rb +3 -0
- data/lib/limelight/theater.rb +15 -6
- data/lib/limelight/util/downloader.rb +3 -1
- data/lib/limelight/util.rb +8 -7
- data/lib/limelight/version.rb +3 -3
- data/lib/limelight.jar +0 -0
- data/productions/examples/8thlight.com/about/props.rb +1 -1
- data/productions/examples/8thlight.com/about/styles.rb +1 -1
- data/productions/examples/8thlight.com/footer.rb +1 -1
- data/productions/examples/8thlight.com/home/props.rb +1 -1
- data/productions/examples/8thlight.com/home/styles.rb +1 -1
- data/productions/examples/8thlight.com/menu.rb +1 -1
- data/productions/examples/8thlight.com/services/props.rb +1 -1
- data/productions/examples/8thlight.com/services/styles.rb +1 -1
- data/productions/examples/8thlight.com/stages.rb +1 -1
- data/productions/examples/8thlight.com/styles.rb +1 -1
- data/productions/examples/calculator/players/button.rb +1 -1
- data/productions/examples/calculator/players/calculator.rb +1 -1
- data/productions/examples/calculator/players/calculator_model.rb +1 -1
- data/productions/examples/calculator/props.rb +1 -1
- data/productions/examples/calculator/styles.rb +1 -1
- data/productions/examples/langstons_ant/init.rb +3 -0
- data/productions/examples/langstons_ant/players/ant.rb +1 -1
- data/productions/examples/langstons_ant/players/log.rb +1 -1
- data/productions/examples/langstons_ant/players/start_stop_button.rb +1 -1
- data/productions/examples/langstons_ant/players/world.rb +1 -1
- data/productions/examples/langstons_ant/props.rb +1 -1
- data/productions/examples/langstons_ant/styles.rb +1 -1
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/props.rb +7 -0
- data/productions/examples/sandbox/alerts/incompatible_production/default_scene/styles.rb +29 -0
- data/productions/examples/sandbox/alerts/incompatible_production/production.rb +49 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/default_scene/default_scene_spec.rb +13 -0
- data/productions/examples/sandbox/alerts/incompatible_production/spec/spec_helper.rb +5 -0
- data/productions/examples/sandbox/alerts/incompatible_production/stages.rb +17 -0
- data/productions/examples/sandbox/alerts/incompatible_production/styles.rb +12 -0
- data/productions/examples/sandbox/alerts/players/alerts.rb +14 -0
- data/productions/examples/sandbox/alerts/props.rb +7 -0
- data/productions/examples/sandbox/alerts/styles.rb +43 -0
- data/productions/examples/sandbox/background_images/props.rb +19 -0
- data/productions/examples/sandbox/background_images/styles.rb +40 -0
- data/productions/examples/sandbox/click_me/players/chromaton.rb +1 -1
- data/productions/examples/sandbox/click_me/props.rb +1 -1
- data/productions/examples/sandbox/click_me/styles.rb +1 -1
- data/productions/examples/sandbox/floaters/players/floater.rb +9 -5
- data/productions/examples/sandbox/floaters/players/surface.rb +1 -1
- data/productions/examples/sandbox/floaters/props.rb +1 -1
- data/productions/examples/sandbox/floaters/styles.rb +13 -13
- data/productions/examples/sandbox/frameing/players/sandbox.rb +3 -0
- data/productions/examples/sandbox/frameing/props.rb +3 -0
- data/productions/examples/sandbox/frameing/styles.rb +3 -0
- data/productions/examples/sandbox/gradients/players/spinner.rb +1 -1
- data/productions/examples/sandbox/gradients/players/teaser.rb +1 -1
- data/productions/examples/sandbox/gradients/players/wave.rb +1 -1
- data/productions/examples/sandbox/gradients/players/waves.rb +1 -1
- data/productions/examples/sandbox/gradients/props.rb +1 -1
- data/productions/examples/sandbox/gradients/styles.rb +1 -1
- data/productions/examples/sandbox/header.rb +4 -1
- data/productions/examples/sandbox/homer/players/homer.rb +1 -1
- data/productions/examples/sandbox/homer/props.rb +1 -1
- data/productions/examples/sandbox/homer/styles.rb +2 -2
- data/productions/examples/sandbox/images/space.png +0 -0
- data/productions/examples/sandbox/images_scene/props.rb +3 -0
- data/productions/examples/sandbox/images_scene/styles.rb +3 -0
- data/productions/examples/sandbox/inputs/players/button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/check_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/combo_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/radio_button_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_area_input.rb +1 -1
- data/productions/examples/sandbox/inputs/players/text_box_input.rb +1 -1
- data/productions/examples/sandbox/inputs/props.rb +1 -1
- data/productions/examples/sandbox/inputs/styles.rb +1 -1
- data/productions/examples/sandbox/kiosk/players/kiosk.rb +36 -0
- data/productions/examples/sandbox/kiosk/props.rb +6 -0
- data/productions/examples/sandbox/kiosk/styles.rb +34 -0
- data/productions/examples/sandbox/players/sandbox.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/players/box.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/props.rb +1 -1
- data/productions/examples/sandbox/rounded_corners/styles.rb +1 -1
- data/productions/examples/sandbox/scrolling/players/add_button.rb +1 -1
- data/productions/examples/sandbox/scrolling/players/cell.rb +1 -1
- data/productions/examples/sandbox/scrolling/props.rb +1 -1
- data/productions/examples/sandbox/scrolling/styles.rb +1 -1
- data/productions/examples/sandbox/sketching/players/sketchpad.rb +1 -1
- data/productions/examples/sandbox/sketching/props.rb +1 -1
- data/productions/examples/sandbox/sketching/styles.rb +1 -1
- data/productions/examples/sandbox/sounds/players/clip.rb +1 -1
- data/productions/examples/sandbox/sounds/props.rb +1 -1
- data/productions/examples/sandbox/sounds/styles.rb +1 -1
- data/productions/examples/sandbox/spec/alerts/alerts_spec.rb +13 -0
- data/productions/examples/sandbox/stages.rb +2 -1
- data/productions/examples/sandbox/styles.rb +1 -1
- data/productions/examples/sandbox/teaser/players/fader.rb +1 -1
- data/productions/examples/sandbox/teaser/props.rb +1 -1
- data/productions/examples/sandbox/teaser/styles.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/players/sample.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/props.rb +1 -1
- data/productions/examples/tutorials/tutorial_1/styles.rb +1 -1
- data/productions/stage_composer/init.rb +1 -1
- data/productions/stage_composer/inspector/players/inspector.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_row.rb +1 -1
- data/productions/stage_composer/inspector/players/prop_tree.rb +1 -1
- data/productions/stage_composer/inspector/players/style_table.rb +1 -1
- data/productions/stage_composer/inspector/players/style_value.rb +1 -1
- data/productions/stage_composer/inspector/props.rb +1 -1
- data/productions/stage_composer/inspector/styles.rb +1 -1
- data/productions/stage_composer/lib/init.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/controller.rb +1 -1
- data/productions/stage_composer/lib/limelight/composer/lethargy.rb +1 -1
- data/productions/stage_composer/production.rb +1 -1
- data/productions/stage_composer/stages.rb +1 -1
- data/productions/startup/production.rb +49 -0
- data/productions/startup/spec/default_scene/default_scene_spec.rb +13 -0
- data/productions/startup/spec/spec_helper.rb +5 -0
- data/productions/startup/stages.rb +5 -2
- data/productions/startup/styles.rb +12 -0
- data/productions/startup/welcome/players/browse_button.rb +1 -1
- data/productions/startup/welcome/players/download_button.rb +1 -1
- data/productions/startup/welcome/players/sandbox_button.rb +1 -1
- data/productions/startup/welcome/props.rb +2 -2
- data/productions/startup/welcome/styles.rb +1 -1
- data/spec/builtin/players/button_spec.rb +1 -1
- data/spec/builtin/players/check_box_spec.rb +1 -1
- data/spec/builtin/players/combo_box_spec.rb +1 -1
- data/spec/builtin/players/image_spec.rb +3 -0
- data/spec/builtin/players/password_box_spec.rb +1 -1
- data/spec/builtin/players/radio_button_spec.rb +7 -7
- data/spec/builtin/players/text_area_spec.rb +1 -1
- data/spec/builtin/players/text_box_spec.rb +1 -1
- data/spec/builtin/utilities_production/spec_helper.rb +4 -0
- data/spec/builtin/utilities_production/utilities_production_spec.rb +143 -0
- data/spec/casting_director_spec.rb +7 -7
- data/spec/client/playbills_spec.rb +3 -0
- data/spec/commands/command_spec.rb +9 -1
- data/spec/commands/create_command_spec.rb +35 -5
- data/spec/commands/freeze_command_spec.rb +3 -0
- data/spec/commands/help_command_spec.rb +6 -3
- data/spec/commands/open_command_spec.rb +24 -2
- data/spec/commands/pack_command_spec.rb +3 -0
- data/spec/commands/unpack_command_spec.rb +4 -1
- data/spec/data_spec.rb +5 -16
- data/spec/dsl/production_builder_spec.rb +1 -1
- data/spec/dsl/prop_builder_spec.rb +19 -19
- data/spec/dsl/stage_builder_spec.rb +1 -1
- data/spec/dsl/styles_builder_spec.rb +1 -1
- data/spec/file_chooser_spec.rb +1 -1
- data/spec/file_filter_spec.rb +1 -1
- data/spec/file_loader_spec.rb +1 -1
- data/spec/gems_spec.rb +3 -0
- data/spec/java_util_spec.rb +1 -1
- data/spec/main_spec.rb +4 -1
- data/spec/paint_action_spec.rb +1 -1
- data/spec/pen_spec.rb +1 -1
- data/spec/producer_spec.rb +73 -32
- data/spec/production_spec.rb +23 -44
- data/spec/prop_spec.rb +102 -64
- data/spec/scene_spec.rb +3 -3
- data/spec/spec_helper.rb +3 -2
- data/spec/stage_spec.rb +172 -36
- data/spec/string_spec.rb +3 -0
- data/spec/studio_spec.rb +131 -3
- data/spec/styles_spec.rb +3 -0
- data/spec/templates/production_templater_spec.rb +12 -1
- data/spec/templates/scene_templater_spec.rb +17 -2
- data/spec/templates/templater_logger_spec.rb +3 -0
- data/spec/templates/templater_spec.rb +3 -0
- data/spec/theater_spec.rb +16 -1
- data/spec/util/downloader_spec.rb +3 -0
- metadata +56 -6
- data/lib/i4jruntime.jar +0 -0
- data/lib/junit-4.4.jar +0 -0
|
@@ -1,9 +1,49 @@
|
|
|
1
|
-
# This file (production.rb)
|
|
1
|
+
# This file (production.rb) is the first file loaded opening a production. It must define a module named 'Production'.
|
|
2
|
+
# The containing production will acquire all the behavior defined in this module.
|
|
3
|
+
# You may define serveral hooks and initialization steps here.
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
name "!-PRODUCTION_NAME-!"
|
|
5
|
+
module Production
|
|
5
6
|
|
|
6
|
-
#
|
|
7
|
-
#
|
|
7
|
+
# # Define this method if you want the production name to be different from the default, directory name.
|
|
8
|
+
# def name
|
|
9
|
+
# return !-PRODUCTION_NAME-!
|
|
10
|
+
# end
|
|
11
|
+
#
|
|
12
|
+
# # Returns the minimum version of limelight required to run this production. Default: "0.0.0"
|
|
13
|
+
# # If the version of limelight used to open this production is less than the minimum,
|
|
14
|
+
# # an error will be displayed (starting with version 0.4.0).
|
|
15
|
+
# #
|
|
16
|
+
# def minimum_limelight_version
|
|
17
|
+
# return "!-CURRENT_VERSION-!"
|
|
18
|
+
# end
|
|
19
|
+
#
|
|
20
|
+
# # Hook #1. Called when the production is newly created, before any loading has been done.
|
|
21
|
+
# # This is a good place to require needed files and instantiate objects in the busines layer.
|
|
22
|
+
# def production_opening
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# # Hook #2. Called after internal gems have been loaded and stages have been instantiated, yet before
|
|
26
|
+
# # any scenes have been opened.
|
|
27
|
+
# def production_loaded
|
|
28
|
+
# end
|
|
29
|
+
#
|
|
30
|
+
# # Hook #3. Called when the production, and all the scenes, have fully opened.
|
|
31
|
+
# def production_opened
|
|
32
|
+
# end
|
|
33
|
+
#
|
|
34
|
+
# # The system will call this methods when it wishes to close the production, perhaps when the user quits the
|
|
35
|
+
# # application. By default the production will always return true. You may override this behavior by re-implenting
|
|
36
|
+
# # the methods here.
|
|
37
|
+
# def allow_close?
|
|
38
|
+
# return true
|
|
39
|
+
# end
|
|
40
|
+
#
|
|
41
|
+
# # Called when the production is about to be closed.
|
|
42
|
+
# def production_closing
|
|
43
|
+
# end
|
|
44
|
+
#
|
|
45
|
+
# # Called when the production is fully closed.
|
|
46
|
+
# def production_closed
|
|
47
|
+
# end
|
|
8
48
|
|
|
9
|
-
|
|
49
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
2
|
+
|
|
3
|
+
describe "!-SCENE_TITLE-!" do
|
|
4
|
+
|
|
5
|
+
uses_scene "!-SCENE_NAME-!", :hidden => true
|
|
6
|
+
|
|
7
|
+
it "should have default text" do
|
|
8
|
+
scene.children.size.should == 1
|
|
9
|
+
root = scene.children[0]
|
|
10
|
+
root.text.should == "This is the !-SCENE_TITLE-! scene."
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
+
|
|
1
4
|
require 'limelight/templates/templater_logger'
|
|
2
5
|
|
|
3
6
|
module Limelight
|
|
@@ -69,7 +72,7 @@ module Limelight
|
|
|
69
72
|
establish_directory(full_path)
|
|
70
73
|
end
|
|
71
74
|
|
|
72
|
-
# Creates the specified file from the specified file template. The file will be created
|
|
75
|
+
# Creates the specified file from the specified file template. The file will be created within the target_root.
|
|
73
76
|
# All parent diretories will be created if needed. The source paramter should be a path pointing to a
|
|
74
77
|
# file template in the source_root directory.
|
|
75
78
|
#
|
data/lib/limelight/theater.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 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
|
require 'limelight/limelight_exception'
|
|
@@ -10,7 +10,9 @@ module Limelight
|
|
|
10
10
|
class Theater
|
|
11
11
|
|
|
12
12
|
include UI::Api::Theater
|
|
13
|
-
|
|
13
|
+
|
|
14
|
+
# Returns the theater's active stage. i.e. the stage most recently used.
|
|
15
|
+
#
|
|
14
16
|
attr_reader :active_stage
|
|
15
17
|
|
|
16
18
|
def initialize
|
|
@@ -37,9 +39,9 @@ module Limelight
|
|
|
37
39
|
|
|
38
40
|
# Adds a Stage to the Theater. Raises an exception is the name of the Stage is duplicated.
|
|
39
41
|
#
|
|
40
|
-
def add_stage(name)
|
|
42
|
+
def add_stage(name, options = {})
|
|
41
43
|
raise LimelightException.new("Duplicate stage name: '#{name}'") if @stages[name]
|
|
42
|
-
stage = build_stage(name)
|
|
44
|
+
stage = build_stage(name, options)
|
|
43
45
|
@stages[name] = stage
|
|
44
46
|
return stage
|
|
45
47
|
end
|
|
@@ -50,6 +52,13 @@ module Limelight
|
|
|
50
52
|
@active_stage = stage
|
|
51
53
|
end
|
|
52
54
|
|
|
55
|
+
# Removes the stage from this theater.
|
|
56
|
+
#
|
|
57
|
+
def stage_closed(stage)
|
|
58
|
+
@stages.delete(stage.name)
|
|
59
|
+
@active_stage = nil if @active_stage == stage
|
|
60
|
+
end
|
|
61
|
+
|
|
53
62
|
# If no Stages are added, the Theater will provide a default Stage named "Limelight".
|
|
54
63
|
#
|
|
55
64
|
def default_stage
|
|
@@ -59,8 +68,8 @@ module Limelight
|
|
|
59
68
|
|
|
60
69
|
protected #############################################
|
|
61
70
|
|
|
62
|
-
def build_stage(name)
|
|
63
|
-
return Limelight::Stage.new(self, name)
|
|
71
|
+
def build_stage(name, options)
|
|
72
|
+
return Limelight::Stage.new(self, name, options)
|
|
64
73
|
end
|
|
65
74
|
|
|
66
75
|
end
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
+
|
|
1
4
|
require 'limelight/data'
|
|
2
5
|
require 'limelight/limelight_exception'
|
|
3
6
|
require 'uri'
|
|
@@ -11,7 +14,6 @@ module Limelight
|
|
|
11
14
|
class Downloader
|
|
12
15
|
|
|
13
16
|
def self.download(resource)
|
|
14
|
-
puts "resource: #{resource}"
|
|
15
17
|
new.download(resource)
|
|
16
18
|
end
|
|
17
19
|
|
data/lib/limelight/util.rb
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 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 Limelight
|
|
@@ -51,12 +51,13 @@ class Module
|
|
|
51
51
|
def prop_reader(*symbols)
|
|
52
52
|
symbols.each do |sym|
|
|
53
53
|
define_method(sym) do
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
return scene.find(sym.to_s)
|
|
55
|
+
# value = instance_variable_get("@#{sym}")
|
|
56
|
+
# if value.nil?
|
|
57
|
+
# value = scene.find(sym.to_s)
|
|
58
|
+
# instance_variable_set("@#{sym}", value) unless value.nil?
|
|
59
|
+
# end
|
|
60
|
+
# return value
|
|
60
61
|
end
|
|
61
62
|
end
|
|
62
63
|
end
|
data/lib/limelight/version.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 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 Limelight
|
|
5
5
|
module VERSION #:nodoc:
|
|
6
6
|
unless defined? MAJOR
|
|
7
7
|
MAJOR = 0
|
|
8
|
-
MINOR =
|
|
9
|
-
TINY =
|
|
8
|
+
MINOR = 4
|
|
9
|
+
TINY = 0
|
|
10
10
|
|
|
11
11
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
|
12
12
|
TAG = "REL_" + [MAJOR, MINOR, TINY].join('_')
|
data/lib/limelight.jar
CHANGED
|
Binary file
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
2
|
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
2
|
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
#- Copyright 2008 8th Light, Inc. All Rights Reserved.
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
2
|
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# This file (props.rb) defines all the props that appear in a scene when loaded. It makes use of the
|
|
2
|
+
# PropBuilder DSL.
|
|
3
|
+
#
|
|
4
|
+
# For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#PropBuilder_DSL
|
|
5
|
+
|
|
6
|
+
root :text => "This production is forever incompatible with the current version of Limelight (for testing purposes)."
|
|
7
|
+
close_button :id => "close_button", :text => "Close this Scene", :on_mouse_clicked => "scene.stage.close"
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# This file, (styles.rb) inside a scene, should define any styles specific to the containing scene.
|
|
2
|
+
# It makes use of the StyleBuilder DSL.
|
|
3
|
+
#
|
|
4
|
+
# For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
|
|
5
|
+
# For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
|
|
6
|
+
|
|
7
|
+
default_scene {
|
|
8
|
+
background_color :black
|
|
9
|
+
horizontal_alignment :center
|
|
10
|
+
vertical_alignment :center
|
|
11
|
+
width "100%"
|
|
12
|
+
height "100%"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
root {
|
|
16
|
+
text_color :white
|
|
17
|
+
font_size 18
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
close_button {
|
|
21
|
+
text_color :blue
|
|
22
|
+
border_color :blue
|
|
23
|
+
padding 5
|
|
24
|
+
border_width 1
|
|
25
|
+
hover {
|
|
26
|
+
text_color :white
|
|
27
|
+
border_color :white
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# This file (production.rb) is the first file loaded opening a production. It must define a module named 'Production'.
|
|
2
|
+
# The containing production will acquire all the behavior defined in this module.
|
|
3
|
+
# You may define serveral hooks and initialization steps here.
|
|
4
|
+
|
|
5
|
+
module Production
|
|
6
|
+
|
|
7
|
+
# # Define this method if you want the production name to be different from the default, directory name.
|
|
8
|
+
# def name
|
|
9
|
+
# return Incompatible Production
|
|
10
|
+
# end
|
|
11
|
+
#
|
|
12
|
+
# # Returns the minimum version of limelight required to run this production. Default: "0.0.0"
|
|
13
|
+
# # If the version of limelight used to open this production is less than the minimum,
|
|
14
|
+
# # an error will be displayed (starting with version 0.4.0).
|
|
15
|
+
# #
|
|
16
|
+
def minimum_limelight_version
|
|
17
|
+
return "99.99.99"
|
|
18
|
+
end
|
|
19
|
+
#
|
|
20
|
+
# # Hook #1. Called when the production is newly created, before any loading has been done.
|
|
21
|
+
# # This is a good place to require needed files and instantiate objects in the busines layer.
|
|
22
|
+
# def production_opening
|
|
23
|
+
# end
|
|
24
|
+
#
|
|
25
|
+
# # Hook #2. Called after internal gems have been loaded and stages have been instantiated, yet before
|
|
26
|
+
# # any scenes have been opened.
|
|
27
|
+
# def production_loaded
|
|
28
|
+
# end
|
|
29
|
+
#
|
|
30
|
+
# # Hook #3. Called when the production, and all the scenes, have fully opened.
|
|
31
|
+
# def production_opened
|
|
32
|
+
# end
|
|
33
|
+
#
|
|
34
|
+
# # The system will call this methods when it wishes to close the production, perhaps when the user quits the
|
|
35
|
+
# # application. By default the production will always return true. You may override this behavior by re-implenting
|
|
36
|
+
# # the methods here.
|
|
37
|
+
# def allow_close?
|
|
38
|
+
# return true
|
|
39
|
+
# end
|
|
40
|
+
#
|
|
41
|
+
# # Called when the production is about to be closed.
|
|
42
|
+
# def production_closing
|
|
43
|
+
# end
|
|
44
|
+
#
|
|
45
|
+
# # Called when the production is fully closed.
|
|
46
|
+
# def production_closed
|
|
47
|
+
# end
|
|
48
|
+
|
|
49
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
2
|
+
|
|
3
|
+
describe "Default Scene" do
|
|
4
|
+
|
|
5
|
+
uses_scene "default_scene", :hidden => true
|
|
6
|
+
|
|
7
|
+
it "should have default text" do
|
|
8
|
+
scene.children.size.should == 1
|
|
9
|
+
root = scene.children[0]
|
|
10
|
+
root.text.should == "This is the Default Scene scene."
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# This file (stages.rb) is used to define the stages within your production.
|
|
2
|
+
#
|
|
3
|
+
# Below is an example statge configuration.
|
|
4
|
+
#
|
|
5
|
+
# stage "center_stage" do
|
|
6
|
+
# default_scene "main"
|
|
7
|
+
# title "Limelight Center Stage"
|
|
8
|
+
# location [0, 0]
|
|
9
|
+
# size [300, 800]
|
|
10
|
+
# end
|
|
11
|
+
|
|
12
|
+
stage "default" do
|
|
13
|
+
default_scene "default_scene"
|
|
14
|
+
title "Limelight"
|
|
15
|
+
location [200, 25]
|
|
16
|
+
size [800, 800]
|
|
17
|
+
end
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# This file, (styles.rb) in the root directory of the production, should define any styles that are used in multiple
|
|
2
|
+
# scenes. It makes use of the StyleBuilder DSL.
|
|
3
|
+
#
|
|
4
|
+
# For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
|
|
5
|
+
# For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
|
|
6
|
+
|
|
7
|
+
# An example style definition
|
|
8
|
+
#foo {
|
|
9
|
+
# width 100
|
|
10
|
+
# height 100
|
|
11
|
+
# background_color :blue
|
|
12
|
+
#}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
module Alerts
|
|
2
|
+
|
|
3
|
+
prop_reader :message_input
|
|
4
|
+
|
|
5
|
+
def open_alert
|
|
6
|
+
stage.alert(message_input.text)
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
def open_incompatible_production
|
|
10
|
+
production_path = File.join(path, "incompatible_production")
|
|
11
|
+
Thread.new { Limelight::Studio.open(production_path) }
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
end
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
__install "header.rb"
|
|
2
|
+
arena do
|
|
3
|
+
label :text => "Alert Message:"
|
|
4
|
+
message_input :id => "message_input", :text => "Sample Message", :players => "text_area"
|
|
5
|
+
action :id => "alert_action", :text => "Open Alert", :on_mouse_clicked => "scene.open_alert"
|
|
6
|
+
action :id => "incompatible_version_action", :text => "Open Incompatible Production", :on_mouse_clicked => "scene.open_incompatible_production"
|
|
7
|
+
end
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# This file, (styles.rb) inside a scene, should define any styles specific to the containing scene.
|
|
2
|
+
# It makes use of the StyleBuilder DSL.
|
|
3
|
+
#
|
|
4
|
+
# For more information see: http://limelightwiki.8thlight.com/index.php/A_Cook%27s_Tour_of_Limelight#Styling_with_styles.rb
|
|
5
|
+
# For a complete listing of style attributes see: http://limelightwiki.8thlight.com/index.php/Style_Attributes
|
|
6
|
+
|
|
7
|
+
alerts {
|
|
8
|
+
background_color :black
|
|
9
|
+
horizontal_alignment :center
|
|
10
|
+
vertical_alignment :top
|
|
11
|
+
width "100%"
|
|
12
|
+
height "100%"
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
action {
|
|
16
|
+
width "100%"
|
|
17
|
+
height 100
|
|
18
|
+
margin 25
|
|
19
|
+
left_margin "30%"
|
|
20
|
+
right_margin "30%"
|
|
21
|
+
background_color :white
|
|
22
|
+
border_color :gray
|
|
23
|
+
border_width 2
|
|
24
|
+
rounded_corner_radius 10
|
|
25
|
+
horizontal_alignment :center
|
|
26
|
+
vertical_alignment :center
|
|
27
|
+
text_color :gray
|
|
28
|
+
font_size 20
|
|
29
|
+
hover {
|
|
30
|
+
secondary_background_color :blue
|
|
31
|
+
gradient :on
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
label {
|
|
37
|
+
text_color :white
|
|
38
|
+
right_padding 10
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message_input {
|
|
42
|
+
width 300
|
|
43
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
__ :name => "sandbox"
|
|
2
|
+
__install "header.rb"
|
|
3
|
+
arena :vertical_alignment => :center do
|
|
4
|
+
control_panel do
|
|
5
|
+
setting do
|
|
6
|
+
label :text => "Background Image Fill Strategy:"
|
|
7
|
+
input :players => "combo_box", :choices => %w{repeat repeat_x repeat_y static scale scale_x scale_y}, :on_value_changed => "scene.find('area').style.background_image_fill_strategy = text"
|
|
8
|
+
end
|
|
9
|
+
setting do
|
|
10
|
+
label :text => "Background Image X"
|
|
11
|
+
input :players => "combo_box", :choices => %w{0 5 25 125 625 left center right 10% 20% 50% 80% 90%}, :on_value_changed => "scene.find('area').style.background_image_x = text"
|
|
12
|
+
end
|
|
13
|
+
setting do
|
|
14
|
+
label :text => "Background Image Y"
|
|
15
|
+
input :players => "combo_box", :choices => %w{0 5 25 125 625 top center bottom 10% 20% 50% 80% 90%}, :on_value_changed => "scene.find('area').style.background_image_y = text"
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
image_area :id => "area", :text => "Area with Background Image"
|
|
19
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#- Copyright � 2008-2009 8th Light, Inc. All Rights Reserved.
|
|
2
|
+
#- Limelight and all included source files are distributed under terms of the GNU LGPL.
|
|
3
|
+
|
|
4
|
+
control_panel {
|
|
5
|
+
width "100%"
|
|
6
|
+
background_color :gray
|
|
7
|
+
secondary_background_color :dark_green
|
|
8
|
+
gradient_angle 270
|
|
9
|
+
gradient :on
|
|
10
|
+
horizontal_alignment :center
|
|
11
|
+
padding 10
|
|
12
|
+
bottom_margin 30
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
setting {
|
|
16
|
+
width 140
|
|
17
|
+
left_margin 20
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
label {
|
|
21
|
+
text_color :white
|
|
22
|
+
font_style "bold"
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
image_area {
|
|
26
|
+
width "80%"
|
|
27
|
+
height "80%"
|
|
28
|
+
alignment :center
|
|
29
|
+
border_width 1
|
|
30
|
+
border_color :black
|
|
31
|
+
background_image "images/space.png"
|
|
32
|
+
text_color :light_grey
|
|
33
|
+
font_size 30
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
logo {
|
|
37
|
+
border_width 1
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|