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.
- data/bin/limelight +0 -0
- data/bin/ll +2 -2
- data/bin/ll.bat +2 -2
- data/lib/init.rb +5 -3
- data/lib/limelight.jar +0 -0
- data/lib/limelight/animation.rb +20 -0
- data/lib/limelight/build_exception.rb +1 -1
- data/lib/limelight/builtin/players.rb +12 -0
- data/lib/limelight/builtin/players/button.rb +24 -0
- data/lib/limelight/builtin/players/check_box.rb +31 -0
- data/lib/limelight/builtin/players/combo_box.rb +55 -0
- data/lib/limelight/builtin/players/combo_box_popup_list.rb +19 -0
- data/lib/limelight/builtin/players/combo_box_popup_list_item.rb +21 -0
- data/lib/limelight/builtin/players/curtains.rb +22 -0
- data/lib/limelight/builtin/players/radio_button.rb +41 -0
- data/lib/limelight/builtin/players/text_area.rb +25 -0
- data/lib/limelight/builtin/players/text_box.rb +25 -0
- data/lib/limelight/builtin/styles.rb +35 -0
- data/lib/limelight/button_group_cache.rb +2 -2
- data/lib/limelight/casting_director.rb +9 -6
- data/lib/limelight/commands.rb +3 -3
- data/lib/limelight/file_chooser.rb +1 -1
- data/lib/limelight/file_filter.rb +1 -1
- data/lib/limelight/java_couplings.rb +57 -0
- data/lib/limelight/java_util.rb +1 -1
- data/lib/limelight/limelight_exception.rb +1 -1
- data/lib/limelight/loaders/file_scene_loader.rb +3 -2
- data/lib/limelight/menu_bar.rb +1 -1
- data/lib/limelight/paint_action.rb +2 -2
- data/lib/limelight/pen.rb +2 -2
- data/lib/limelight/producer.rb +21 -5
- data/lib/limelight/production.rb +1 -1
- data/lib/limelight/production_builder.rb +1 -1
- data/lib/limelight/prop.rb +49 -39
- data/lib/limelight/prop_builder.rb +1 -1
- data/lib/limelight/scene.rb +3 -3
- data/lib/limelight/stage.rb +5 -5
- data/lib/limelight/stage_builder.rb +1 -1
- data/lib/limelight/styles.rb +2 -2
- data/lib/limelight/styles_builder.rb +7 -7
- data/lib/limelight/theater.rb +2 -2
- data/lib/limelight/util.rb +1 -1
- data/lib/limelight/version.rb +2 -2
- data/productions/examples/8thlight.com/about/about.txt +3 -3
- 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/images/bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/button_bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/canvas_bg.jpg +0 -0
- data/productions/examples/8thlight.com/images/thumbnail_book.jpg +0 -0
- 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/services.txt +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 +8 -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/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/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 +21 -11
- data/productions/examples/sandbox/floaters/players/surface.rb +5 -1
- data/productions/examples/sandbox/floaters/props.rb +1 -1
- data/productions/examples/sandbox/floaters/styles.rb +1 -1
- data/productions/examples/sandbox/gradients/players/spinner.rb +5 -12
- data/productions/examples/sandbox/gradients/players/teaser.rb +7 -14
- data/productions/examples/sandbox/gradients/players/wave.rb +7 -14
- data/productions/examples/sandbox/gradients/players/waves.rb +7 -14
- data/productions/examples/sandbox/gradients/props.rb +1 -1
- data/productions/examples/sandbox/gradients/styles.rb +1 -1
- data/productions/examples/sandbox/header.rb +2 -1
- data/productions/examples/sandbox/homer/players/homer.rb +12 -8
- data/productions/examples/sandbox/homer/props.rb +1 -1
- data/productions/examples/sandbox/homer/styles.rb +1 -1
- 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 +3 -3
- 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 +3 -3
- data/productions/examples/sandbox/inputs/styles.rb +2 -1
- 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 +19 -0
- data/productions/examples/sandbox/scrolling/players/cell.rb +1 -2
- data/productions/examples/sandbox/scrolling/props.rb +9 -4
- data/productions/examples/sandbox/scrolling/styles.rb +10 -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 -2
- data/productions/examples/sandbox/sounds/bird.au +0 -0
- data/productions/examples/sandbox/sounds/cat.au +0 -0
- data/productions/examples/sandbox/sounds/cow.au +0 -0
- data/productions/examples/sandbox/sounds/dog.au +0 -0
- data/productions/examples/sandbox/sounds/donkey.au +0 -0
- data/productions/examples/sandbox/sounds/duck.au +0 -0
- data/productions/examples/sandbox/sounds/players/clip.rb +10 -0
- data/productions/examples/sandbox/sounds/props.rb +10 -0
- data/productions/examples/sandbox/sounds/styles.rb +17 -0
- data/productions/examples/sandbox/stages.rb +2 -1
- data/productions/examples/sandbox/styles.rb +6 -6
- data/productions/examples/sandbox/teaser/players/fader.rb +22 -16
- 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 +2 -2
- data/productions/stage_composer/inspector/styles.rb +3 -3
- 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/players/browse_button.rb +3 -0
- data/productions/startup/players/download_button.rb +4 -1
- data/productions/startup/players/sandbox_button.rb +4 -1
- data/productions/startup/props.rb +3 -5
- data/productions/startup/styles.rb +5 -5
- data/spec/builtin/players/button_spec.rb +21 -0
- data/spec/builtin/players/check_box_spec.rb +29 -0
- data/spec/builtin/players/combo_box_spec.rb +29 -0
- data/spec/{players → builtin/players}/radio_button_spec.rb +9 -20
- data/spec/builtin/players/text_area_spec.rb +27 -0
- data/spec/builtin/players/text_box_spec.rb +27 -0
- data/spec/casting_director_spec.rb +3 -3
- data/spec/commands_spec.rb +2 -2
- data/spec/file_chooser_spec.rb +1 -1
- data/spec/file_filter_spec.rb +1 -1
- data/spec/java_util_spec.rb +1 -1
- data/spec/loaders/file_loader_spec.rb +1 -1
- data/spec/paint_action_spec.rb +1 -1
- data/spec/pen_spec.rb +1 -1
- data/spec/producer_spec.rb +14 -4
- data/spec/production_builder_spec.rb +1 -1
- data/spec/production_spec.rb +1 -1
- data/spec/prop_builder_spec.rb +1 -1
- data/spec/prop_spec.rb +66 -5
- data/spec/scene_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -1
- data/spec/stage_builder_spec.rb +1 -1
- data/spec/stage_spec.rb +1 -1
- data/spec/styles_builder_spec.rb +34 -2
- data/spec/theater_spec.rb +1 -1
- metadata +130 -106
- data/lib/limelight/players.rb +0 -9
- data/lib/limelight/players/button.rb +0 -29
- data/lib/limelight/players/check_box.rb +0 -38
- data/lib/limelight/players/combo_box.rb +0 -44
- data/lib/limelight/players/radio_button.rb +0 -47
- data/lib/limelight/players/text_area.rb +0 -25
- data/lib/limelight/players/text_box.rb +0 -25
- data/spec/players/button_spec.rb +0 -31
- data/spec/players/check_box_spec.rb +0 -40
- data/spec/players/combo_box_spec.rb +0 -39
- data/spec/players/text_area_spec.rb +0 -37
- data/spec/players/text_box_spec.rb +0 -37
data/lib/limelight/stage.rb
CHANGED
@@ -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
|
require 'limelight/java_util'
|
@@ -13,7 +13,7 @@ module Limelight
|
|
13
13
|
attr_accessor :default_scene
|
14
14
|
attr_reader :frame, :current_scene, :name, :theater
|
15
15
|
|
16
|
-
include
|
16
|
+
include UI::Api::Stage
|
17
17
|
|
18
18
|
def public_choose_file
|
19
19
|
choose_file
|
@@ -65,9 +65,9 @@ module Limelight
|
|
65
65
|
@frame.setJMenuBar(scene.menu_bar)
|
66
66
|
@frame.load(scene.panel)
|
67
67
|
scene.stage = self
|
68
|
-
scene.panel.
|
68
|
+
scene.panel.snap_to_size
|
69
69
|
if(scene.has_static_size?)
|
70
|
-
@frame.set_size(scene.panel.
|
70
|
+
@frame.set_size(scene.panel.width, scene.panel.height)
|
71
71
|
end
|
72
72
|
@current_scene = scene
|
73
73
|
end
|
@@ -85,7 +85,7 @@ module Limelight
|
|
85
85
|
private ###############################################
|
86
86
|
|
87
87
|
def build_frame
|
88
|
-
@frame =
|
88
|
+
@frame = UI::Model::Frame.new(self)
|
89
89
|
@frame.set_size(800, 800)
|
90
90
|
@frame.set_location(200, 25)
|
91
91
|
@frame.title = title
|
data/lib/limelight/styles.rb
CHANGED
@@ -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
|
require 'yaml'
|
@@ -24,7 +24,7 @@ module Limelight
|
|
24
24
|
end
|
25
25
|
|
26
26
|
def self.create_style(hash)
|
27
|
-
style =
|
27
|
+
style = Styles::FlatStyle.new
|
28
28
|
hash.each_pair do |key, value|
|
29
29
|
value = value.to_s.gsub("pigpen", "#")
|
30
30
|
style.send((key.to_s + "=").to_sym, value)
|
@@ -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
|
module Limelight
|
5
5
|
|
6
|
-
def self.build_styles(&block)
|
7
|
-
builder = StylesBuilder.new
|
6
|
+
def self.build_styles(style_hash = nil, &block)
|
7
|
+
builder = StylesBuilder.new(style_hash)
|
8
8
|
builder.instance_eval(&block) if block
|
9
9
|
return builder.__styles
|
10
10
|
end
|
@@ -12,8 +12,8 @@ module Limelight
|
|
12
12
|
class StylesBuilder
|
13
13
|
attr_reader :__styles
|
14
14
|
|
15
|
-
def initialize
|
16
|
-
@__styles = {}
|
15
|
+
def initialize(style_hash = nil)
|
16
|
+
@__styles = style_hash || {}
|
17
17
|
end
|
18
18
|
|
19
19
|
def method_missing(sym, &block)
|
@@ -30,10 +30,10 @@ module Limelight
|
|
30
30
|
class StyleBuilder
|
31
31
|
attr_reader :__style
|
32
32
|
|
33
|
-
def initialize(name, styles_builder)
|
34
|
-
@__style = Java::limelight.ui.RichStyle.new
|
33
|
+
def initialize(name, styles_builder, options = {})
|
35
34
|
@__name = name
|
36
35
|
@__styles_builder = styles_builder
|
36
|
+
@__style = @__styles_builder.__styles[name] || Styles::RichStyle.new
|
37
37
|
end
|
38
38
|
|
39
39
|
def hover(&block)
|
data/lib/limelight/theater.rb
CHANGED
@@ -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
|
require 'limelight/limelight_exception'
|
@@ -7,7 +7,7 @@ module Limelight
|
|
7
7
|
|
8
8
|
class Theater
|
9
9
|
|
10
|
-
include
|
10
|
+
include UI::Api::Theater
|
11
11
|
|
12
12
|
attr_reader :active_stage
|
13
13
|
|
data/lib/limelight/util.rb
CHANGED
data/lib/limelight/version.rb
CHANGED
@@ -1,11 +1,11 @@
|
|
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 Limelight
|
5
5
|
module VERSION #:nodoc:
|
6
6
|
unless defined? MAJOR
|
7
7
|
MAJOR = 0
|
8
|
-
MINOR =
|
8
|
+
MINOR = 2
|
9
9
|
TINY = 0
|
10
10
|
|
11
11
|
STRING = [MAJOR, MINOR, TINY].join('.')
|
@@ -1,20 +1,20 @@
|
|
1
1
|
You may ask, "Where does the name '8th Light' come from?" To answer that, let's first discuss the foundational principles held by 8th Light.
|
2
2
|
|
3
|
-
Craftsmanship
|
3
|
+
<sub_title>Craftsmanship</sub_title>
|
4
4
|
The folks at 8th Light consider themselves as software craftsmen rather than software engineers or software scientists. Clearly, engineering skills and scientific understanding are required to write good software. It is the application of these skills in combination with a pragmatic attitude and a sense of quality that define craftsmanship.
|
5
5
|
|
6
6
|
As craftsmen, our style of software development differs from traditional styles of software development. For one, we maintain close collaboration with the customers or end users of the systems we build. We are continually refining and improving every bit of the code base as the system evolves. Every member of our team works together in an open and synergistic workspace. To ensure a well designed system with almost no defects we drive development though tests. Feedback during development is extremely valuable which is why we work in iterations delivering working functionality regularly.
|
7
7
|
|
8
8
|
Perhaps the most important aspect of our work is pride. We build software that we are proud to have built and that our clients are proud to have.
|
9
9
|
|
10
|
-
Apprenticeship
|
10
|
+
<sub_title>Apprenticeship</sub_title>
|
11
11
|
It has been known for decades that the best way to become a good software developer is to learn from a good software developer. This is in line with the craftsmanship model. In any craft, newcomers start out as apprentices. 8th Light hires only apprentices.
|
12
12
|
|
13
13
|
This serves two purposes. The first is that of maintaining quality. Starting out as an apprentice allows newcomers to focus on nothing but learning as much as possible by working with senior 8th Light developers. When an apprentice concludes his apprenticeship he is able to build quality software.
|
14
14
|
|
15
15
|
The second reason is uniformity and consistency. Studies have shown that good developers are consistent and uniform in their style of coding. Every good developer has a different style but each one is consistent with themself. Inconsistencies in a software system add complexity and decrease productivity. Therefore, 8th Light strives to build development teams that practice the same style of development. In this way our teams remain productive and our software remains simple.
|
16
16
|
|
17
|
-
8th Light
|
17
|
+
<sub_title>8th Light</sub_title>
|
18
18
|
The values described above are not unlike those of martial arts. The name '8th Light' holds special meaning to Micah (the company's founder) who trained in the Eighth Light school of Jujitsu called Hakkoryu. 8th Light was chosen as a name for this company because we share much of the spirit and values of martial arts, particularly Hakkoryu Jujitsu.
|
19
19
|
|
20
20
|
"The name "Hakkoryu" is based on a philosophical Japanese view of the color spectrum as being divided into nine bands of light. The eighth shade is infrared, which is invisible to the naked eye but extremely powerful, as are Hakkoryu techniques. The number eight in Japan also has associated with it numerous philosophical and religious meanings that are beyond the scope of this brief introduction."
|
@@ -1,2 +1,2 @@
|
|
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.
|
@@ -1,2 +1,2 @@
|
|
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.
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
1
|
At 8th Light, we use a unique process of actuating ideas, accepting the best and most efficient practices, and synthesizing those practices into an effectual and coherent method. Communication, quality, and innovation drive the decisions in this process, and the end goal is to produce impressive software for clients according to their specifications.
|
2
2
|
|
3
|
-
Values
|
3
|
+
<sub_title>Values</sub_title>
|
4
4
|
Communication is a priority. We believe that working closely with the customer is the only way to ensure that a product is created in sync with both the customer’s vision and their desired outcome. Daily interactions with the customer are preferred, as is working on site. We create with the understanding that each finished product is the result of its own specific evolution, and that the software being written should constantly be subject to modifications of concept and conclusion. Each iteration produces more business value, as with each brush stroke the image on a canvas is further disclosed. At 8th Light, we employ a creative process that highlights cooperation and consideration, and we appreciate that this practice is the difference between good software and great software.
|
5
5
|
|
6
6
|
The quality of code in an application indicates many things; high-quality code makes your product easier to extend and maintain, as changes to the code are embraced by the framework and design. Moving fast becomes easier, and the customer is able to stay ahead of their competitors as well as adapt to changes quickly and efficiently.
|
@@ -1,2 +1,2 @@
|
|
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.
|
@@ -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
|
page {
|
@@ -6,6 +6,7 @@ page {
|
|
6
6
|
height "100%"
|
7
7
|
horizontal_alignment "center"
|
8
8
|
background_image "images/bg.jpg"
|
9
|
+
vertical_scroll_bar :on
|
9
10
|
}
|
10
11
|
|
11
12
|
main_column {
|
@@ -88,6 +89,12 @@ section_title {
|
|
88
89
|
font_size 20
|
89
90
|
font_style "bold"
|
90
91
|
}
|
92
|
+
|
93
|
+
sub_title {
|
94
|
+
text_color "#0049F4"
|
95
|
+
font_size 32
|
96
|
+
font_face "Courier"
|
97
|
+
}
|
91
98
|
|
92
99
|
section_body {
|
93
100
|
width 823
|
@@ -1,15 +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
|
-
require 'thread'
|
5
|
-
|
6
4
|
module Floater
|
7
5
|
|
8
6
|
FRICTION = 0.1
|
9
7
|
MAX_DISTANCE = 85
|
10
|
-
MUTEX = Mutex.new
|
11
8
|
|
12
9
|
attr_reader :sliding
|
10
|
+
|
11
|
+
def mouse_clicked(e)
|
12
|
+
puts "You caught " + text
|
13
|
+
end
|
13
14
|
|
14
15
|
def width
|
15
16
|
@width = style.width.to_i if @width.nil?
|
@@ -45,7 +46,17 @@ module Floater
|
|
45
46
|
d = distance(x, y, source_x, source_y)
|
46
47
|
return if d > MAX_DISTANCE
|
47
48
|
calculate_vector(source_x, source_y)
|
48
|
-
|
49
|
+
|
50
|
+
@sliding = true
|
51
|
+
@animation = animate(:updates_per_second => 30) do
|
52
|
+
begin
|
53
|
+
slide
|
54
|
+
rescue Exception => e
|
55
|
+
puts e
|
56
|
+
puts e.backtrace
|
57
|
+
@animation.stop
|
58
|
+
end
|
59
|
+
end
|
49
60
|
end
|
50
61
|
|
51
62
|
def calculate_vector(sx, sy)
|
@@ -56,10 +67,9 @@ module Floater
|
|
56
67
|
@velocity = 20
|
57
68
|
find_bounds if @max_x.nil?
|
58
69
|
end
|
59
|
-
|
70
|
+
|
60
71
|
def slide
|
61
|
-
@
|
62
|
-
while @velocity > 1
|
72
|
+
if @velocity > 1
|
63
73
|
@x_coefficient *= -1 if(x < @min_x || x > @max_x)
|
64
74
|
@y_coefficient *= -1 if(y < @min_y || y > @max_y)
|
65
75
|
x2 = x + (@x_coefficient * @velocity)
|
@@ -67,10 +77,10 @@ module Floater
|
|
67
77
|
self.new_x = x2
|
68
78
|
self.new_y = y2
|
69
79
|
@velocity -= @velocity * FRICTION
|
70
|
-
|
71
|
-
|
80
|
+
else
|
81
|
+
@sliding = false
|
82
|
+
@animation.stop
|
72
83
|
end
|
73
|
-
@sliding = false
|
74
84
|
end
|
75
85
|
|
76
86
|
def find_bounds
|
@@ -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 Surface
|
@@ -13,5 +13,9 @@ module Surface
|
|
13
13
|
y = e.y
|
14
14
|
floaters.each { |floater| floater.get_away_from(x, y) }
|
15
15
|
end
|
16
|
+
|
17
|
+
def mouse_clicked(e)
|
18
|
+
puts "You missed"
|
19
|
+
end
|
16
20
|
|
17
21
|
end
|