lotu 0.1.6 → 0.1.7

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.1.7
@@ -43,6 +43,8 @@ class Example < Lotu::Window
43
43
  end
44
44
 
45
45
  @ruby = MovingRuby.new(:x => width/2, :y => height/2)
46
+ @info = Lotu::TextBox.new
47
+ @info.text("Move around with arrow keys")
46
48
  end
47
49
 
48
50
  end
@@ -53,6 +53,8 @@ class Example < Lotu::Window
53
53
  @info.watch(@cursor1, :color => 0xff0099ff, :font_size => 15)
54
54
  @info.watch("@cursor2 data:")
55
55
  @info.watch(@cursor2, :color => 0xff99ff00, :font_size => 15)
56
+ @info.text("")
57
+ @info.text("Move @cursor1 with mouse and @cursor2 with arrow keys (click with space!)", :font_size => 15)
56
58
  end
57
59
 
58
60
  end
@@ -39,11 +39,13 @@ class Example < Lotu::Window
39
39
  @ruby2.evader = @ruby
40
40
  end
41
41
 
42
- @window_info = Lotu::TextBox.new
43
- @window_info.watch(@fps_counter)
42
+ @window_info = Lotu::TextBox.new(:font_size => 15)
43
+ @window_info.watch(@fps_counter, :font_size => 20)
44
44
  @window_info.watch(@cursor, :color => 0xffff0000)
45
+ @window_info.text("Click to start the simulation")
46
+ @window_info.text("One will pursuit while the other evades, right click to center evader on screen")
45
47
 
46
- @ruby_info = Lotu::TextBox.new(:attach_to => @ruby, :font_size => 16)
48
+ @ruby_info = Lotu::TextBox.new(:attach_to => @ruby, :font_size => 14)
47
49
  @ruby_info.watch(@ruby)
48
50
  end
49
51
 
data/lib/lotu/text_box.rb CHANGED
@@ -19,6 +19,10 @@ module Lotu
19
19
  draw_me
20
20
  end
21
21
 
22
+ def text(text, opts={})
23
+ watch(text, opts)
24
+ end
25
+
22
26
  def watch(subject, opts={})
23
27
  @watch_list << subject
24
28
  @subject_opts[subject] = opts
data/lotu.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lotu}
8
- s.version = "0.1.6"
8
+ s.version = "0.1.7"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["lobo_tuerto"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 6
9
- version: 0.1.6
8
+ - 7
9
+ version: 0.1.7
10
10
  platform: ruby
11
11
  authors:
12
12
  - lobo_tuerto