square_speech_balloon 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/db/square.png CHANGED
Binary file
@@ -1,7 +1,7 @@
1
1
  {
2
- "plain@pettan.com": {
3
- "classname": "PlainSpeechBalloon",
4
- "caption": "plain",
2
+ "square@pettan.com": {
3
+ "classname": "SquareSpeechBalloon",
4
+ "caption": "Square",
5
5
  "settings": {
6
6
  "speech_balloon": {
7
7
  "default_width": 150,
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "all": {
11
11
  "balloon": {
12
- "system_picture_file": "plain.png"
12
+ "system_picture_file": "square.png"
13
13
  },
14
14
  "speech": {
15
15
  "x_rate": 0,
Binary file
@@ -1,4 +1 @@
1
- {"square@pettan.com":{"classname":"SquareSpeechBalloon","caption":"plain","settings":{"speech_balloon":{"default_width":150,"default_height":150},"all":{"balloon":{"system_picture_id":
2
- {
3
- "text":"iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAIAAACzY+a1AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAAEnQAABJ0Ad5mH3gAAAISSURBVHhe7dOxFQAgDIRQ9186NlmCvG9jK+C95xwwME7WwH6/7Ps9fCTMfwIJJcwbyANYoYR5A3kAK5QwbyAPYIUS5g3kAaxQwryBPIAVSpg3kAewQgnzBvIAVihh3kAewAolzBvIA1ihhHkDeQArlDBvIA9ghRLmDeQBrFDCvIE8gBVKmDeQB7BCCfMG8gBWKGHeQB7ACiXMG8gDWKGEeQN5ACuUMG8gD2CFEuYN5AGsUMK8gTyAFUqYN5AHsEIJ8wbyAFYoYd5AHsAKJcwbyANYoYR5A3kAK5QwbyAPYIUS5g3kAaxQwryBPIAVSpg3kAewQgnzBvIAVihh3kAewAolzBvIA1ihhHkDeQArlDBvIA9ghRLmDeQBrFDCvIE8gBVKmDeQB7BCCfMG8gBWKGHeQB7ACiXMG8gDWKGEeQN5ACuUMG8gD2CFEuYN5AGsUMK8gTyAFUqYN5AHsEIJ8wbyAFYoYd5AHsAKJcwbyANYoYR5A3kAK5QwbyAPYIUS5g3kAaxQwryBPIAVSpg3kAewQgnzBvIAVihh3kAewAolzBvIA1ihhHkDeQArlDBvIA9ghRLmDeQBrFDCvIE8gBVKmDeQB7BCCfMG8gBWKGHeQB7ACiXMG8gDWKGEeQN5ACuUMG8gD2CFEuYN5AGsUMK8gTyAFUqYN5AHsEIJ8wbyAFYoYd5AHsAKryTckq6mgQ/T675COdQRngAAAABJRU5ErkJggg=="
4
- },"speech":{"x_rate":0,"y_rate":0,"width_rate":100,"height_rate":100}}}}}
1
+ {"square@pettan.com":{"classname":"SquareSpeechBalloon","caption":"Square","settings":{"speech_balloon":{"default_width":150,"default_height":150},"all":{"balloon":{"system_picture_id":{"text":"iVBORw0KGgoAAAANSUhEUgAAAJYAAACWCAYAAAA8AXHiAAAACXBIWXMAABcSAAAXEgFnn9JSAAABqUlEQVR4nO3UMQrDUAwFQSn4/lf+rnKCZDGYmUqliuXtzJyBP/s8/QDvdH2PcwwXv9vdmbFYRIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJIRFQlgkhEVCWCSERUJYJHZmztNP8D4Wi8QNaTAGK2LVzWEAAAAASUVORK5CYII="}},"speech":{"x_rate":0,"y_rate":0,"width_rate":100,"height_rate":100}}}}}
@@ -24,7 +24,20 @@ module SquareSpeechBalloon
24
24
  end
25
25
 
26
26
  module BalloonModule
27
- def supply_default parsed_settings
27
+ def new_speech_balloon
28
+ @new_speech_balloon
29
+ end
30
+
31
+ def new_speech_balloon= v
32
+ @new_speech_balloon = v
33
+ end
34
+
35
+ def get_speech_balloon
36
+ self.speech_balloon || @new_speech_balloon
37
+ end
38
+
39
+ def supply_default
40
+ parsed_settings = get_speech_balloon.speech_balloon_template.parsed_settings
28
41
  s = parsed_settings['all']['balloon']
29
42
  self.x = 0
30
43
  self.y = 0
@@ -41,15 +54,30 @@ module SquareSpeechBalloon
41
54
  @extend_balloon = SquareSpeechBalloon::Balloon.new params
42
55
  end
43
56
 
44
- def select_system_picture parsed_settings
57
+ def select_system_picture
58
+ parsed_settings = get_speech_balloon.speech_balloon_template.parsed_settings
45
59
  s = parsed_settings['all']['balloon']
46
60
  self.system_picture_id = s['system_picture_id']
61
+ self.system_picture_id
47
62
  end
48
63
 
49
64
  end
50
65
 
51
66
  module SpeechModule
52
- def supply_default parsed_settings
67
+ def new_speech_balloon
68
+ @new_speech_balloon
69
+ end
70
+
71
+ def new_speech_balloon= v
72
+ @new_speech_balloon = v
73
+ end
74
+
75
+ def get_speech_balloon
76
+ self.speech_balloon || @new_speech_balloon
77
+ end
78
+
79
+ def supply_default
80
+ parsed_settings = get_speech_balloon.speech_balloon_template.parsed_settings
53
81
  s = parsed_settings['all']['speech']
54
82
  self.x = s['x_rate']
55
83
  self.y = s['y_rate']
@@ -1,3 +1,3 @@
1
1
  module SquareSpeechBalloon
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: square_speech_balloon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-29 00:00:00.000000000 Z
12
+ date: 2013-06-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -83,6 +83,7 @@ files:
83
83
  - db/migrate/20130629042756_create_square_speech_balloon_speeches.rb
84
84
  - db/square.png
85
85
  - db/square_speech_balloon_templates.json
86
+ - db/work/square.png
86
87
  - db/work/square_speech_balloon_templates.json
87
88
  - lib/square_speech_balloon/engine.rb
88
89
  - lib/square_speech_balloon/version.rb